From 115e45c389e74bb98730916bd13c2faa29a3a31c Mon Sep 17 00:00:00 2001 From: 502647092 Date: Sat, 10 Sep 2016 04:09:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BF=BD=E7=95=A5=E5=B7=B2=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=9A=84=E4=BA=8B=E4=BB=B6=20=E5=8F=91=E9=80=81?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- src/main/java/pw/yumc/MiaoChat/listeners/ChatListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/pw/yumc/MiaoChat/listeners/ChatListener.java b/src/main/java/pw/yumc/MiaoChat/listeners/ChatListener.java index d775522..2164455 100644 --- a/src/main/java/pw/yumc/MiaoChat/listeners/ChatListener.java +++ b/src/main/java/pw/yumc/MiaoChat/listeners/ChatListener.java @@ -14,6 +14,7 @@ import org.bukkit.Material; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.inventory.ItemStack; @@ -41,7 +42,7 @@ public class ChatListener implements Listener { new SubscribeTask(true, true); } - @EventHandler + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onChat(final AsyncPlayerChatEvent e) { final Player p = e.getPlayer(); final ChatRule cr = plugin.getConfigExt().getChatRule(e.getPlayer()); @@ -78,6 +79,7 @@ public class ChatListener implements Listener { tr.send(ne); } } + Bukkit.getConsoleSender().sendMessage(tr.toOldMessageFormat()); } private LinkedList handlerMessage(final LinkedList il, String message) {