mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-16 00:46:36 +02:00
948dcf3653
- 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.
25 lines
785 B
Java
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;
|
|
}
|
|
}
|
|
}
|
|
}
|