Disable the use of Ender Chests

This commit is contained in:
Ben 2016-04-10 11:20:51 +01:00
parent e8e73306be
commit 8ee2c02dd9

View File

@ -304,6 +304,16 @@ public class Gameplay extends MiniPlugin
event.setCancelled(true);
}
@EventHandler
public void disableEnderChest(PlayerInteractEvent event)
{
if (event.getClickedBlock().getType().equals(Material.ENDER_CHEST))
{
UtilPlayer.message(event.getPlayer(), F.main("Clans", "You are not permitted to use Ender Chests."));
return;
}
}
@EventHandler
public void onInteract(PlayerInteractEvent event)
{