ChestShop-3/com/Acrobot/ChestShop/Listeners/entityExplode.java
Acrobot 948dcf3653 - Added an option to toggle the WG flag
- Removed old pre-CB 1.1-R6 chest compatibility
- Changed priorities for block destroying
- Synchronised run() in Queue, as it's called from asynch thread.
2012-04-07 12:41:20 +02:00

25 lines
785 B
Java

package com.Acrobot.ChestShop.Listeners;
import com.Acrobot.ChestShop.Config.Config;
import com.Acrobot.ChestShop.Config.Property;
import org.bukkit.block.Block;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityExplodeEvent;
/**
* @author Acrobot
*/
public class entityExplode implements Listener {
@EventHandler(ignoreCancelled = true)
public static void onEntityExplode(EntityExplodeEvent event) {
if (event.blockList() == null || !Config.getBoolean(Property.USE_BUILT_IN_PROTECTION)) return;
for (Block block : event.blockList()) {
if (blockBreak.cancellingBlockBreak(block, null)) {
event.setCancelled(true);
return;
}
}
}
}