Switch PlayerChatEvent to AsyncPlayerChatEvent for bleeding-edge 1.3.1 Bukkit builds to prevent persistent nag from Bukkit, update Bukkit lib

UNTESTED, please confirm working... looks like chat event cancellation might be bugged in Bukkit at the moment but will hopefully be fixed soon if so
This commit is contained in:
Brettflan 2012-08-05 19:56:07 -05:00
parent 73898673f6
commit ca61860d7b
3 changed files with 5 additions and 5 deletions

Binary file not shown.

View File

@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.AsyncPlayerChatEvent;
import com.massivecraft.factions.Conf; import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayer;
@ -30,7 +30,7 @@ public class FactionsChatListener implements Listener
// this is for handling slashless command usage and faction/alliance chat, set at lowest priority so Factions gets to them first // this is for handling slashless command usage and faction/alliance chat, set at lowest priority so Factions gets to them first
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)
public void onPlayerEarlyChat(PlayerChatEvent event) public void onPlayerEarlyChat(AsyncPlayerChatEvent event)
{ {
if (event.isCancelled()) return; if (event.isCancelled()) return;
@ -97,7 +97,7 @@ public class FactionsChatListener implements Listener
// this is for handling insertion of the player's faction tag, set at highest priority to give other plugins a chance to modify chat first // this is for handling insertion of the player's faction tag, set at highest priority to give other plugins a chance to modify chat first
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerChat(PlayerChatEvent event) public void onPlayerChat(AsyncPlayerChatEvent event)
{ {
if (event.isCancelled()) return; if (event.isCancelled()) return;

View File

@ -4,7 +4,7 @@ import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerPreLoginEvent; import org.bukkit.event.player.PlayerPreLoginEvent;
@ -35,7 +35,7 @@ public class MPluginSecretPlayerListener implements Listener
} }
@EventHandler(priority = EventPriority.LOW) @EventHandler(priority = EventPriority.LOW)
public void onPlayerChat(PlayerChatEvent event) public void onPlayerChat(AsyncPlayerChatEvent event)
{ {
if (event.isCancelled()) return; if (event.isCancelled()) return;