Fix mimic, allow chests and invite. Fixes PC-375

This commit is contained in:
samczsun 2016-05-24 16:40:25 -04:00
parent 2991bec44d
commit 9da9dce398
No known key found for this signature in database
GPG Key ID: B0AFDBD87206805D
2 changed files with 4 additions and 7 deletions

View File

@ -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()) + "."));

View File

@ -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