Deny build perms by default

This commit is contained in:
SvenjaReißaus 2019-03-18 19:30:29 -05:00
parent a7b824e964
commit 3c109bfb0c
No known key found for this signature in database
GPG Key ID: E5494A03FA36D54B
2 changed files with 3 additions and 3 deletions

View File

@ -486,7 +486,7 @@ public class FactionsBlockListener implements Listener {
/// <param name="shouldHurt">Determine whether we should hurt the player when access is denied</param>
private static boolean CheckPlayerAccess(Player player, FPlayer me, FLocation loc, Faction myFaction, Access access, PermissableAction action, boolean shouldHurt) {
boolean landOwned = (myFaction.doesLocationHaveOwnersSet(loc) && !myFaction.getOwnerList(loc).isEmpty());
if (landOwned && myFaction.getOwnerListString(loc).contains(player.getName()) || me.getRole() == Role.LEADER) return true;
if ((landOwned && myFaction.getOwnerListString(loc).contains(player.getName())) || (me.getRole() == Role.LEADER && me.getFactionId().equals(myFaction.getId()))) return true;
else if (landOwned && !myFaction.getOwnerListString(loc).contains(player.getName())) {
me.msg("<b>You can't " + action + " in this territory, it is owned by: " + myFaction.getOwnerListString(loc));
if (shouldHurt) {
@ -501,9 +501,9 @@ public class FactionsBlockListener implements Listener {
}
me.msg(TL.GENERIC_NOPERMISSION, action);
return false;
}
} else if (access == Access.ALLOW) return true;
// We assume faction land is not owned, and the access is not set to DENY, so we allow to execute the action
return true;
return false;
}
private static boolean CheckActionState(Faction target, FLocation location, FPlayer me, PermissableAction action, boolean pain) {