Container permission fixed ( relationally )
This commit is contained in:
parent
18416f4d21
commit
38db648044
@ -301,7 +301,19 @@ public class FactionsPlayerListener implements Listener {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Move up access check to check for exceptions
|
||||
Access access = otherFaction.getAccess(me, action);
|
||||
boolean doTerritoryEnemyProtectedCheck = true;
|
||||
|
||||
if (action.equals(PermissableAction.CONTAINER)) {
|
||||
if (access == Access.ALLOW) {
|
||||
doTerritoryEnemyProtectedCheck = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Did not nest the boolean so that it stands out when Im looking
|
||||
// through the code later.
|
||||
if (doTerritoryEnemyProtectedCheck) {
|
||||
// You may use any block unless it is another faction's territory...
|
||||
if (rel.isNeutral() || (rel.isEnemy() && Conf.territoryEnemyProtectMaterials) || (rel.isAlly() && Conf.territoryAllyProtectMaterials) || (rel.isTruce() && Conf.territoryTruceProtectMaterials)) {
|
||||
if (!justCheck) {
|
||||
@ -309,8 +321,10 @@ public class FactionsPlayerListener implements Listener {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Access access = otherFaction.getAccess(me, action);
|
||||
if (access != Access.ALLOW && me.getRole() != Role.ADMIN) {
|
||||
// TODO: Update this once new access values are added other than just allow / deny.
|
||||
if ((myFaction.getOwnerListString(loc) != null && !myFaction.getOwnerListString(loc).isEmpty() && myFaction.getOwnerListString(loc).contains(player.getName()))) {
|
||||
|
Loading…
Reference in New Issue
Block a user