Let's try building perms one more time
This commit is contained in:
parent
11b2eff79c
commit
d9a8de33eb
Binary file not shown.
@ -881,9 +881,16 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
|
|
||||||
if (block == null) return; // clicked in air, apparently
|
if (block == null) return; // clicked in air, apparently
|
||||||
|
|
||||||
if (!CheckPlayerAccess(player, fplayer, loc, faction, faction.getAccess(fplayer, PermissableAction.BUILD), PermissableAction.BUILD, (faction.getAccess(fplayer, PermissableAction.PAIN_BUILD) == Access.ALLOW))
|
if (!canPlayerUseBlock(player, block, true) && !playerCanUseItemHere(player, block.getLocation(), event.getMaterial(), true) && !FactionsBlockListener.playerCanBuildDestroyBlock(player, block.getLocation(), "BUILD", true)) {
|
||||||
|| !canPlayerUseBlock(player, block, false)
|
event.setCancelled(true);
|
||||||
|| !playerCanUseItemHere(player, block.getLocation(), event.getMaterial(), false)) {
|
return;
|
||||||
|
}
|
||||||
|
if (!canPlayerUseBlock(player, block, false)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
event.setUseInteractedBlock(Event.Result.DENY);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!playerCanUseItemHere(player, block.getLocation(), event.getMaterial(), false)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
event.setUseInteractedBlock(Event.Result.DENY);
|
event.setUseInteractedBlock(Event.Result.DENY);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user