Prevent players from smuggling items into warzones with ender chests.

This is mainly for servers such as the Warhub, where most players can make
their own warzones. Inexperienced zone makers may place ender chests in
zones which makes their zone susceptible to smuggling items.

This may also apply for zones which would like to use ender chests for
aesthetics.

Hopefully this change shouldn't be a problem. I cannot think of any way
that an ender chest would be used inside of a warzone.
This commit is contained in:
cmastudios 2013-03-07 17:17:06 -06:00
parent a3f73b5fe7
commit 6b35645150
1 changed files with 4 additions and 0 deletions

View File

@ -231,6 +231,10 @@ public class WarPlayerListener implements Listener {
War.war.badMsg(player, "Can't use items while still in spawn.");
}
}
if (zone != null && event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.ENDER_CHEST) {
event.setCancelled(true);
War.war.badMsg(player, "Can't use ender chests while playing in a warzone!");
}
}
}