diff --git a/Changelog.txt b/Changelog.txt index b3ab86bf1..71990f14b 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -8,6 +8,7 @@ Key: - Removal Version 1.3.10-dev + = Fixed admin chat being seen by everyone = Fixed players never being removed from memory (memory leak) Version 1.3.09 diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index d3b235e17..1bb5da2c7 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -360,9 +360,9 @@ public class PlayerListener implements Listener { plugin.getLogger().info("[A]<" + playerName + "> " + chatEvent.getMessage()); - for (Player p : plugin.getServer().getOnlinePlayers()) { - if (Permissions.getInstance().adminChat(player) || player.isOp()) { - p.sendMessage(prefix + chatEvent.getMessage()); + for (Player otherPlayer : plugin.getServer().getOnlinePlayers()) { + if (Permissions.getInstance().adminChat(otherPlayer) || otherPlayer.isOp()) { + otherPlayer.sendMessage(prefix + chatEvent.getMessage()); } }