From ab55ed69c56f46b6072adf31a4aac9b4856cb7d0 Mon Sep 17 00:00:00 2001 From: Llm Dl Date: Fri, 12 Jun 2020 14:36:16 -0500 Subject: [PATCH] v0.72: - Fix ConcurrentModificationException caused by spies. - Closes https://github.com/TownyAdvanced/Towny/issues/4077 --- pom.xml | 2 +- resources/changelog.txt | 5 ++++- .../bukkit/TownyChat/channels/StandardChannel.java | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 432e1de..cded79e 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ com.palmergames.bukkit TownyChat jar - 0.71 + 0.72 diff --git a/resources/changelog.txt b/resources/changelog.txt index 1ce9dfd..14cf2c5 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -306,4 +306,7 @@ v0.70: - De-clutters the chat. - Closes: https://github.com/TownyAdvanced/Towny/issues/2665 v0.71: - - Bugfixes on the AsyncChatHookEvents, courtesy of Rebstew with PR #26. \ No newline at end of file + - Bugfixes on the AsyncChatHookEvents, courtesy of Rebstew with PR #26. +v0.72: + - Fix ConcurrentModificationException caused by spies. + - Closes https://github.com/TownyAdvanced/Towny/issues/4077 \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java b/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java index dbb8a06..0a01e04 100644 --- a/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java +++ b/src/com/palmergames/bukkit/TownyChat/channels/StandardChannel.java @@ -292,7 +292,7 @@ public class StandardChannel extends Channel { // Remove spies who've already seen the message naturally. for (Player spy : spies) if (recipients.contains(spy)) - spies.remove(spy); + continue; else spy.sendMessage(ChatColor.GOLD + "[SPY] " + ChatColor.WHITE + format + ": " + event.getMessage()); }