Browse Source

event more debugging

Kajetan Johannes Hammerle 2 năm trước cách đây
mục cha
commit
1fecfa3545
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      src/main/java/me/km/snuviscript/ScriptEvents.java

+ 6 - 1
src/main/java/me/km/snuviscript/ScriptEvents.java

@@ -724,8 +724,13 @@ public class ScriptEvents implements BlockHarvest, Craft {
                     GameRules rules = w.getGameRules();
                     if(rules != null) {
                         try {
-                            b = !rules.getBoolean(GameRules.MOB_GRIEFING);
+                            Boolean br = rules.getBoolean(GameRules.MOB_GRIEFING);
+                            if(br == null) {
+                                System.out.println("Boolean is null");
+                            }
+                            b = !br;
                         } catch(Exception ex) {
+                            System.out.println("onMobGriefing Exception");
                             ex.printStackTrace();
                         }
                     } else {