- Lowered event priorities to HIGH to allow other plugins the chance to beat us to the event and cancel.
This commit is contained in:
ElgarL committed 2012-01-27 13:35:47 +00:00
1 parent d71959e829
commit 38835bea33
4 files changed
+16 -7

No files matched your search

+3 -1
View File
@@ -79,4 +79,6 @@ v0.14:
- The default permission node for the global chat channel has changed to 'towny.chat.general'
- TownyChat now registers is't permissions with Bukkit.
v0.15:
- Updated for the new Bukkit Event system.
- Updated for the new Bukkit Event system.
v0.16:
- Lowered event priorities to HIGH to allow other plugins the chance to beat us to the event and cancel.
@@ -5,5 +5,6 @@ public enum channelTypes {
TOWN,
NATION,
DEFAULT,
GLOBAL
GLOBAL,
PRIVATE
}
@@ -43,9 +43,12 @@ public class TownyPlayerHighestListener implements Listener {
this.dynMap = dynMap;
}
@EventHandler(priority = EventPriority.HIGHEST)
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
if (event.isCancelled())
return;
Player player = event.getPlayer();
// Test if this player is registered with Towny.
@@ -63,7 +66,7 @@ public class TownyPlayerHighestListener implements Listener {
Channel channel = plugin.getChannelsHandler().getChannel(player, command);
if (channel != null) {
System.out.print("Channel Found");
//System.out.print("Channel Found");
event.setMessage(message);
@@ -94,9 +97,12 @@ public class TownyPlayerHighestListener implements Listener {
}
}
@EventHandler(priority = EventPriority.HIGHEST)
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerChat(PlayerChatEvent event) {
if (event.isCancelled())
return;
Player player = event.getPlayer();
// Check if essentials has this player muted.