Build/Destroy permission fixed ( relationally )
This commit is contained in:
parent
38db648044
commit
705a370d31
@ -344,6 +344,10 @@ public class FactionsBlockListener implements Listener {
|
|||||||
boolean pain = !justCheck && rel.confPainBuild(online);
|
boolean pain = !justCheck && rel.confPainBuild(online);
|
||||||
boolean deny = rel.confDenyBuild(online);
|
boolean deny = rel.confDenyBuild(online);
|
||||||
|
|
||||||
|
Access access = otherFaction.getAccess(me, PermissableAction.fromString(action));
|
||||||
|
if (access == Access.ALLOW && ((rel == Relation.ALLY) || (rel == Relation.ENEMY) || (rel == Relation.NEUTRAL) || (rel == Relation.TRUCE))) {
|
||||||
|
deny = false;
|
||||||
|
}
|
||||||
// hurt the player for building/destroying in other territory?
|
// hurt the player for building/destroying in other territory?
|
||||||
if (pain) {
|
if (pain) {
|
||||||
player.damage(Conf.actionDeniedPainAmount);
|
player.damage(Conf.actionDeniedPainAmount);
|
||||||
@ -380,7 +384,7 @@ public class FactionsBlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check the permission just after making sure the land isn't owned by someone else to avoid bypass.
|
// Check the permission just after making sure the land isn't owned by someone else to avoid bypass.
|
||||||
Access access = otherFaction.getAccess(me, PermissableAction.fromString(action));
|
|
||||||
if (access != Access.ALLOW && me.getRole() != Role.ADMIN) {
|
if (access != Access.ALLOW && me.getRole() != Role.ADMIN) {
|
||||||
// TODO: Update this once new access values are added other than just allow / deny.
|
// TODO: Update this once new access values are added other than just allow / deny.
|
||||||
if (access == Access.DENY) {
|
if (access == Access.DENY) {
|
||||||
|
Loading…
Reference in New Issue
Block a user