From 45b695011183bf1f3df196da20d2f933569d7df7 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 7 Apr 2016 03:33:49 +1000 Subject: [PATCH] Fixes chat error / plot deny * --- .../java/com/plotsquared/bukkit/listeners/PlayerEvents.java | 5 +---- .../main/java/com/intellectualcrafters/plot/object/Plot.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index b856f7f85..f216d2b8d 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -603,14 +603,11 @@ public class PlayerEvents extends PlotListener implements Listener { } } } - String full = format.replaceAll("%plot_id%", id.x + ";" + id.y).replaceAll("%sender%", sender).replaceAll("%msg%", message); + String full = format.replace("%plot_id%", id.x + ";" + id.y).replace("%sender%", sender).replace("%msg%", message); full = ChatColor.translateAlternateColorCodes('&', full); -// format = format.replaceAll("%plot_id%", id.x + ";" + id.y).replaceAll("%sender%", "%s").replaceAll("%msg%", "%s"); -// format = ChatColor.translateAlternateColorCodes('&', format); for (Player receiver : recipients) { receiver.sendMessage(full); } -// event.setFormat(format); } @EventHandler(priority = EventPriority.LOWEST) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java index bafbc6e67..79130e18b 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -1635,7 +1635,7 @@ public class Plot { public boolean removeDenied(UUID uuid) { if (uuid == DBFunc.everyone) { boolean result = false; - for (UUID other : getDenied()) { + for (UUID other : new HashSet<>(getDenied())) { result = result || rmvDenied(other); } return result; @@ -1662,7 +1662,7 @@ public class Plot { public boolean removeTrusted(UUID uuid) { if (uuid == DBFunc.everyone) { boolean result = false; - for (UUID other : getTrusted()) { + for (UUID other : new HashSet<>(getTrusted())) { result = result || rmvTrusted(other); } return result;