dissallow chests, doors, furnaces, etc. from being accessed in territories that are not yours
This commit is contained in:
parent
81c2d2a11f
commit
98edd0a452
@ -291,6 +291,13 @@ public class ClansGame extends MiniPlugin
|
|||||||
|
|
||||||
ClanRelation access = _clans.getClanUtility().getAccess(player, loc);
|
ClanRelation access = _clans.getClanUtility().getAccess(player, loc);
|
||||||
|
|
||||||
|
// Doors, chests, & furnaces
|
||||||
|
if (!access.equals(ClanRelation.SELF) && event.getAction() == Action.RIGHT_CLICK_BLOCK && loc.getBlock().getType().name().contains("DOOR") || UtilItem.doesHaveGUI(loc.getBlock().getType()))
|
||||||
|
{
|
||||||
|
UtilPlayer.message(player, F.main("Clans", "You are not allowed to use here."));
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
|
||||||
// Hoe Return
|
// Hoe Return
|
||||||
if (access != ClanRelation.SELF && !UtilBlock.usable(event.getClickedBlock()))
|
if (access != ClanRelation.SELF && !UtilBlock.usable(event.getClickedBlock()))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user