This fixes the Permissions being bypassed. Tested and successfully passed
This commit is contained in:
parent
66fba62b0f
commit
8a3198fa7e
Binary file not shown.
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user