fix: change listener event priority

This commit is contained in:
darksaid98 committed 2024-07-10 23:58:17 +02:00
1 parent 1ada253b07
commit 1bb5a5430b
2 files changed
+4 -1

No files matched your search

@@ -15,6 +15,9 @@ import java.util.WeakHashMap;
public class ChatEventProcess {
public static void processChatEvent(AsyncChatEvent e, WeakHashMap<Player, String> directedChat) {
if (e.isCancelled())
return;
Player p = e.getPlayer();
// Save the message
@@ -56,7 +56,7 @@ public class TownyChatPlayerListener implements Listener {
plugin.getChannelsHandler().getAllChannels().values().forEach(channel -> channel.forgetPlayer(p));
}
@EventHandler(priority = EventPriority.LOW)
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerChat(AsyncChatEvent e) {
ChatEventProcess.processChatEvent(e, directedChat);
}