From a37ab10414e529d79d213d5adb66c49fe91abb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Sun, 3 May 2020 18:13:54 +0200 Subject: [PATCH] Don't send chat spy to message sender --- .../java/com/plotsquared/bukkit/listener/PlayerEvents.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java index d1c292009..3f8537463 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java @@ -962,6 +962,9 @@ public class PlayerEvents extends PlotListener implements Listener { .replace("%plot_id%", id.x + ";" + id.y).replace("%sender%", sender) .replace("%msg%", message); for (Player player : spies) { + if (player.equals(event.getPlayer())) { + continue; + } player.sendMessage(spyMessage); } }