From a037fddbb197f61bbcb8f6b5c6c704fec866cb8a Mon Sep 17 00:00:00 2001 From: Cedric Date: Sun, 12 Nov 2023 10:48:34 +0100 Subject: [PATCH] ref: added more debug stuff --- .../signals/handler/SignalStateHandler.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/troblecodings/signals/handler/SignalStateHandler.java b/src/main/java/com/troblecodings/signals/handler/SignalStateHandler.java index cd0d23a8e..71c49fa44 100644 --- a/src/main/java/com/troblecodings/signals/handler/SignalStateHandler.java +++ b/src/main/java/com/troblecodings/signals/handler/SignalStateHandler.java @@ -341,6 +341,11 @@ private static void sendTo(final SignalStateInfo info, final Map properties, final EntityPlayer player) { if (properties == null || properties.isEmpty()) { + System.out.println("Tried to send empty PropertiesMap on [" + stateInfo + + "] to Player [" + player + "]! Printing StackTrace..."); + for (final StackTraceElement e : Thread.currentThread().getStackTrace()) { + System.out.println(e); + } return; } sendTo(player, packToByteBuffer(stateInfo, properties)); @@ -349,7 +354,11 @@ private static void sendToPlayer(final SignalStateInfo stateInfo, private static void sendToAll(final SignalStateInfo stateInfo, final Map properties) { if (properties == null || properties.isEmpty()) { - return; + System.out.println("Tried to send empty PropertiesMap on [" + stateInfo + + "] to all! Printing StackTrace..."); + for (final StackTraceElement e : Thread.currentThread().getStackTrace()) { + System.out.println(e); + } } final ByteBuffer buffer = packToByteBuffer(stateInfo, properties); stateInfo.world.playerEntities.forEach(player -> sendTo(player, buffer));