*/
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onBlockPlace(BlockPlaceEvent event)
{
Player player = event.getPlayer();
WorldConfig world = CreeperConfig.getWorld(player.getWorld());
if (event.getBlockPlaced().getType() == Material.TNT
&& !CreeperPermissionManager.checkPermissions(player, false, "bypass.place-tnt"))
{
boolean blocked = world.getBool(WCfgVal.BLOCK_TNT);
if (blocked)
event.setCancelled(true);
if (world.getBool(WCfgVal.WARN_TNT))
CreeperMessenger.warn(CreeperPlayer.WarningCause.TNT, player, blocked, null);
}
else if (world.isGriefBlackListed(event.getBlock())
&& !CreeperPermissionManager.checkPermissions(player, false, "bypass.place-blacklist"))
{
boolean blocked = world.getBool(WCfgVal.GRIEF_BLOCK_BLACKLIST);
if (blocked)
event.setCancelled(true);
if (world.getBool(WCfgVal.WARN_BLACKLIST))
CreeperMessenger.warn(CreeperPlayer.WarningCause.BLACKLIST, player, blocked, event.getBlockPlaced().getType().toString());
}
}