Fixed claim using moderator checks instead of f perms

This commit is contained in:
DroppingAnvil 2020-03-30 16:33:50 -05:00 committed by droppinganvil
parent 07599fa06d
commit b3771feb01

View File

@ -842,12 +842,14 @@ public abstract class MemoryFPlayer implements FPlayer {
return true; return true;
} else if (currentFaction.getAccess(this, PermissableAction.TERRITORY) == Access.ALLOW) { } else if (currentFaction.getAccess(this, PermissableAction.TERRITORY) == Access.ALLOW) {
return true; return true;
} else if (currentFaction.isWilderness() && forFaction.getAccess(this, PermissableAction.TERRITORY) == Access.ALLOW) {
return true;
} else if (myFaction != forFaction) { } else if (myFaction != forFaction) {
error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_CANTCLAIM.toString(), forFaction.describeTo(this)); error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_CANTCLAIM.toString(), forFaction.describeTo(this));
} else if (forFaction == currentFaction) { } else if (forFaction == currentFaction) {
error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_ALREADYOWN.toString(), forFaction.describeTo(this, true)); error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_ALREADYOWN.toString(), forFaction.describeTo(this, true));
} else if (this.getRole().value < Role.MODERATOR.value) { } else if (forFaction.getAccess(this, PermissableAction.TERRITORY) != Access.ALLOW) {
error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_MUSTBE.toString(), Role.MODERATOR.getTranslation()); error = TL.COMMAND_CLAIM_DENIED.toString();
} else if (forFaction.getFPlayers().size() < Conf.claimsRequireMinFactionMembers) { } else if (forFaction.getFPlayers().size() < Conf.claimsRequireMinFactionMembers) {
error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_MEMBERS.toString(), Conf.claimsRequireMinFactionMembers); error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_MEMBERS.toString(), Conf.claimsRequireMinFactionMembers);
} else if (currentFaction.isSafeZone()) { } else if (currentFaction.isSafeZone()) {