Fix mimic, allow chests and invite. Fixes PC-375
This commit is contained in:
parent
2991bec44d
commit
9da9dce398
@ -378,12 +378,6 @@ public class ClansAdmin
|
||||
if (target == null)
|
||||
return;
|
||||
|
||||
if (target.getName().equals(caller.getName()))
|
||||
{
|
||||
UtilPlayer.message(caller, F.main("Clans Admin", "You cannot invite yourself."));
|
||||
return;
|
||||
}
|
||||
|
||||
//Inform
|
||||
clan.inform(caller.getName() + " invited " + target.getName() + " to join Clan " + clan.getName() + ".", caller.getName());
|
||||
UtilPlayer.message(caller, F.main("Clans Admin", "You invited " + target.getName() + " to join " + F.elem("Clan " + clan.getName()) + "."));
|
||||
|
@ -327,13 +327,16 @@ public class ClansGame extends MiniPlugin
|
||||
|
||||
ClanRelation access = _clans.getClanUtility().getAccess(player, loc);
|
||||
ClanInfo clan = _clans.getClan(player);
|
||||
ClanInfo mimicClan = _clans.getClanAdmin().getMimic(player, false);
|
||||
ClanInfo blockClan = _clans.getClanUtility().getClaim(loc) == null ? null : _clans.getClan(_clans.getClanUtility().getClaim(loc).Owner);
|
||||
if (blockClan.equals(mimicClan)) access = ClanRelation.SELF;
|
||||
|
||||
// Doors, chests, & furnaces
|
||||
if (blockClan != null && !blockClan.equals(clan) && (event.getAction() == Action.RIGHT_CLICK_BLOCK && (loc.getBlock().getType().name().contains("DOOR") || UtilItem.doesHaveGUI(loc.getBlock().getType()))))
|
||||
if (blockClan != null && (!blockClan.equals(clan) && !blockClan.equals(mimicClan)) && (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 that here."));
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Hoe Return
|
||||
|
Loading…
Reference in New Issue
Block a user