stop recruits from opening trapped chests
This commit is contained in:
parent
306e56980c
commit
bcd4480f23
@ -210,15 +210,18 @@ 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 (_clans.getClanUtility().getRole(event.getPlayer()) == ClanRole.RECRUIT)
|
||||
if (event.getBlock().getType() == Material.CHEST || event.getBlock().getType() == Material.TRAPPED_CHEST)
|
||||
{
|
||||
// Disallow
|
||||
event.setCancelled(true);
|
||||
if (_clans.getClanUtility().getRole(event.getPlayer()) == ClanRole.RECRUIT)
|
||||
{
|
||||
// Disallow
|
||||
event.setCancelled(true);
|
||||
|
||||
// Inform
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Clans", "Clan Recruits cannot break " + F.elem(ItemStackFactory.Instance.GetName(event.getBlock(), true)) + "."));
|
||||
// Inform
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Clans", "Clan Recruits cannot break " + F.elem(ItemStackFactory.Instance.GetName(event.getBlock(), true)) + "."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user