stop recruits from opening trapped chests
This commit is contained in:
parent
306e56980c
commit
bcd4480f23
@ -210,7 +210,9 @@ public class ClansGame extends MiniPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Disallow Recruit Chest
|
// 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)
|
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)) + "."));
|
UtilPlayer.message(event.getPlayer(), F.main("Clans", "Clan Recruits cannot break " + F.elem(ItemStackFactory.Instance.GetName(event.getBlock(), true)) + "."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Allow
|
// Allow
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user