From 2f0bab1a2a5e9d185ecaa94718f4b10794c023df Mon Sep 17 00:00:00 2001 From: ElgarL Date: Sun, 23 Oct 2011 16:39:49 +0000 Subject: [PATCH] - changed PLAYER_CHAT event to run earlier so we triger before other chat plugins. If players are using chat modes we need to run first to cancel the chat event for other plugins. --- src/changelog.txt | 4 +++- src/com/palmergames/bukkit/TownyChat/Chat.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/changelog.txt b/src/changelog.txt index 7fb18cf..261c1dc 100644 --- a/src/changelog.txt +++ b/src/changelog.txt @@ -1,4 +1,6 @@ v0.1: - Initial release v0.2: - - Fixed players entering regex fields in chat crashing chat. \ No newline at end of file + - Fixed players entering regex fields in chat crashing {msg}. + - changed PLAYER_CHAT event to run earlier so we triger before other chat plugins. + If players are using chat modes we need to run first to cancel the chat event for other plugins. \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/Chat.java b/src/com/palmergames/bukkit/TownyChat/Chat.java index c8fe0ce..9930df9 100644 --- a/src/com/palmergames/bukkit/TownyChat/Chat.java +++ b/src/com/palmergames/bukkit/TownyChat/Chat.java @@ -71,7 +71,7 @@ public class Chat extends JavaPlugin { public void registerEvents() { TownyPlayerListener = new TownyPlayerHighestListener(towny); - pm.registerEvent(Event.Type.PLAYER_CHAT, TownyPlayerListener, Priority.Highest, this); + pm.registerEvent(Event.Type.PLAYER_CHAT, TownyPlayerListener, Priority.High, this); //Run this one level lower so we go before other chat plugins. pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, TownyPlayerListener, Priority.Highest, this); }