Check for perms after checking if it's a server faction

This commit is contained in:
Trent Hensler 2018-03-12 21:06:53 -07:00
parent 3e83916682
commit d7646516ec

View File

@ -319,11 +319,6 @@ public class FactionsPlayerListener implements Listener {
return true; return true;
} }
Access access = otherFaction.getAccess(me, PermissableAction.ITEM);
if (access != null && access != Access.UNDEFINED) {
return access == Access.ALLOW;
}
if (otherFaction.hasPlayersOnline()) { if (otherFaction.hasPlayersOnline()) {
if (!Conf.territoryDenyUseageMaterials.contains(material)) { if (!Conf.territoryDenyUseageMaterials.contains(material)) {
return true; // Item isn't one we're preventing for online factions. return true; // Item isn't one we're preventing for online factions.
@ -366,6 +361,11 @@ public class FactionsPlayerListener implements Listener {
return false; return false;
} }
Access access = otherFaction.getAccess(me, PermissableAction.ITEM);
if (access != null && access != Access.UNDEFINED) {
return access == Access.ALLOW;
}
Faction myFaction = me.getFaction(); Faction myFaction = me.getFaction();
Relation rel = myFaction.getRelationTo(otherFaction); Relation rel = myFaction.getRelationTo(otherFaction);