From dd6e13dd947b5d9c2f8c85fc539d1c4df03789dc Mon Sep 17 00:00:00 2001 From: boy0001 Date: Fri, 31 Jul 2015 05:38:51 +1000 Subject: [PATCH] Fixes #472 --- pom.xml | 2 +- .../java/com/plotsquared/bukkit/listeners/PlayerEvents.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 42c18431f..d2e786532 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ UTF-8 PlotSquared - 2.12.19 + 3.0.1 PlotSquared jar diff --git a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index af26d8cbc..3976cb286 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -749,8 +749,10 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen WEManager.bypass.add(pp.getName()); } } - ((BukkitPlayer) player).hasPerm = new HashSet<>(); - ((BukkitPlayer) player).noPerm = new HashSet<>(); + if (Settings.PERMISSION_CACHING) { + ((BukkitPlayer) pp).hasPerm = new HashSet<>(); + ((BukkitPlayer) pp).noPerm = new HashSet<>(); + } } @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)