This fixes the Permissions being bypassed. Tested and successfully passed

This commit is contained in:
SvenjaReißaus 2019-03-13 18:11:39 -05:00
parent 66fba62b0f
commit 8a3198fa7e
No known key found for this signature in database
GPG Key ID: B14150951DBF6D29
2 changed files with 8 additions and 7 deletions

View File

@ -143,7 +143,6 @@ public class FactionsPlayerListener implements Listener {
if (!justCheck) {
me.msg(TL.PLAYER_USE_TERRITORY, TextUtil.getMaterialName(material), otherFaction.getTag(myFaction));
}
return false;
}
@ -181,7 +180,6 @@ public class FactionsPlayerListener implements Listener {
}
PermissableAction action = null;
if (SavageFactions.plugin.mc113) {
switch (block.getType()) {
case LEVER:
@ -312,12 +310,15 @@ public class FactionsPlayerListener implements Listener {
}
// We only care about some material types.
/// Who was the idiot?
if (otherFaction.hasPlayersOnline()) {
if (!Conf.territoryProtectedMaterials.contains(material))
return true;
if (Conf.territoryProtectedMaterials.contains(material)) {
return false;
}
} else {
if (!Conf.territoryProtectedMaterialsWhenOffline.contains(material))
return true;
if (Conf.territoryProtectedMaterialsWhenOffline.contains(material)) {
return false;
}
}
// Move up access check to check for exceptions
@ -343,7 +344,7 @@ public class FactionsPlayerListener implements Listener {
}
}
return CheckPlayerAccess(player, me, loc, myFaction, access, PermissableAction.CONTAINER);
return CheckPlayerAccess(player, me, loc, myFaction, access, action);
}