stop recruits from opening trapped chests

This commit is contained in:
NewGarbo 2016-02-23 15:57:12 +00:00
parent 306e56980c
commit bcd4480f23
1 changed files with 10 additions and 7 deletions

View File

@ -210,7 +210,9 @@ public class ClansGame extends MiniPlugin
}
// Disallow Recruit Chest
if (_clans.getClanUtility().isClaimed(event.getBlock().getLocation())) if (event.getBlock().getTypeId() == 54)
if (_clans.getClanUtility().isClaimed(event.getBlock().getLocation()))
{
if (event.getBlock().getType() == Material.CHEST || event.getBlock().getType() == Material.TRAPPED_CHEST)
{
if (_clans.getClanUtility().getRole(event.getPlayer()) == ClanRole.RECRUIT)
{
@ -221,6 +223,7 @@ public class ClansGame extends MiniPlugin
UtilPlayer.message(event.getPlayer(), F.main("Clans", "Clan Recruits cannot break " + F.elem(ItemStackFactory.Instance.GetName(event.getBlock(), true)) + "."));
}
}
}
// Allow
return;