Selaa lähdekoodia

Monitor and ignoreCancelledEvents onBlockPlace

NuclearW 13 vuotta sitten
vanhempi
sitoutus
c8ff58bb6c

+ 3 - 1
src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java

@@ -56,9 +56,11 @@ public class mcBlockListener implements Listener
         this.plugin = plugin;
     }
     
-    @EventHandler
+    @EventHandler(priority = EventPriority.MONITOR)
     public void onBlockPlace(BlockPlaceEvent event) 
     {
+    	if(event.isCancelled()) return;
+
     	//Setup some basic vars
     	Block block;
     	Player player = event.getPlayer();