Let's try building perms one more time

This commit is contained in:
SvenjaReißaus 2019-03-18 22:35:15 -05:00
parent 11b2eff79c
commit d9a8de33eb
No known key found for this signature in database
GPG Key ID: E5494A03FA36D54B
2 changed files with 10 additions and 3 deletions

View File

@ -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;