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