From 4c494c572e33fb9cd202366cd7f511f220b74d21 Mon Sep 17 00:00:00 2001 From: Fabrizio La Rosa Date: Wed, 29 Jul 2020 00:41:07 +0200 Subject: [PATCH] Optimized condition --- src/main/java/com/songoda/skyblock/listeners/Block.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/songoda/skyblock/listeners/Block.java b/src/main/java/com/songoda/skyblock/listeners/Block.java index c36f6e3b..67ad636b 100644 --- a/src/main/java/com/songoda/skyblock/listeners/Block.java +++ b/src/main/java/com/songoda/skyblock/listeners/Block.java @@ -653,9 +653,9 @@ public class Block implements Listener { island.hasRole(IslandRole.Member, player.getUniqueId()) || island.hasRole(IslandRole.Coop, player.getUniqueId()) || island.hasRole(IslandRole.Operator, player.getUniqueId()) || - (visitors.contains(player.getUniqueId()) && - player.hasPermission("fabledskyblock.generator.anywhere") && - !ignoreVisitors); + (!ignoreVisitors && + visitors.contains(player.getUniqueId()) && + player.hasPermission("fabledskyblock.generator.anywhere")); if (isMember && islandManager.isLocationAtIsland(island, player.getLocation(), world)) { possiblePlayers.add(player);