Update for remaining old PlayerChatEvents, update EssentialsChat libs and integration accordingly

This commit is contained in:
Brettflan 2012-08-07 21:51:31 -05:00
parent 5a558a2f0f
commit 6059ee0b0b
6 changed files with 5 additions and 6 deletions

Binary file not shown.

Binary file not shown.

BIN
lib/EssentialsChat_2.x.jar Normal file

Binary file not shown.

View File

@ -11,7 +11,7 @@ import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerChatEvent;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.Location;
import org.bukkit.Material;
@ -221,8 +221,7 @@ public class P extends MPlugin
// Simply put, should this chat event be left for Factions to handle? For now, that means players with Faction Chat
// enabled or use of the Factions f command without a slash; combination of isPlayerFactionChatting() and isFactionsCommand()
public boolean shouldLetFactionsHandleThisChat(PlayerChatEvent event)
public boolean shouldLetFactionsHandleThisChat(AsyncPlayerChatEvent event)
{
if (event == null) return false;
return (isPlayerFactionChatting(event.getPlayer()) || isFactionsCommand(event.getMessage()));

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.integration;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerChatEvent;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.P;
@ -25,11 +25,11 @@ public class EssentialsOldVersionFeatures
{
essChat.addEssentialsChatListener("Factions", new IEssentialsChatListener()
{
public boolean shouldHandleThisChat(PlayerChatEvent event)
public boolean shouldHandleThisChat(AsyncPlayerChatEvent event)
{
return P.p.shouldLetFactionsHandleThisChat(event);
}
public String modifyMessage(PlayerChatEvent event, Player target, String message)
public String modifyMessage(AsyncPlayerChatEvent event, Player target, String message)
{
return message.replace(Conf.chatTagReplaceString, P.p.getPlayerFactionTagRelation(event.getPlayer(), target)).replace("[FACTION_TITLE]", P.p.getPlayerTitle(event.getPlayer()));
}