mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-30 06:03:59 +01:00
Update for remaining old PlayerChatEvents, update EssentialsChat libs and integration accordingly
This commit is contained in:
parent
ddd17830c0
commit
124a46c791
Binary file not shown.
Binary file not shown.
BIN
lib/EssentialsChat_2.x.jar
Normal file
BIN
lib/EssentialsChat_2.x.jar
Normal file
Binary file not shown.
@ -9,7 +9,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ public class P extends MPlugin
|
|||||||
// enabled or use of the Factions f command without a slash; combination of isPlayerFactionChatting() and isFactionsCommand()
|
// 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;
|
if (event == null) return false;
|
||||||
return (isPlayerFactionChatting(event.getPlayer()) || isFactionsCommand(event.getMessage()));
|
return (isPlayerFactionChatting(event.getPlayer()) || isFactionsCommand(event.getMessage()));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.massivecraft.factions.integration;
|
package com.massivecraft.factions.integration;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
|
||||||
import com.massivecraft.factions.P;
|
import com.massivecraft.factions.P;
|
||||||
import com.massivecraft.factions.listeners.FactionsChatListener;
|
import com.massivecraft.factions.listeners.FactionsChatListener;
|
||||||
@ -25,11 +25,11 @@ public class EssentialsOldVersionFeatures
|
|||||||
{
|
{
|
||||||
essChat.addEssentialsChatListener("Factions", new IEssentialsChatListener()
|
essChat.addEssentialsChatListener("Factions", new IEssentialsChatListener()
|
||||||
{
|
{
|
||||||
public boolean shouldHandleThisChat(PlayerChatEvent event)
|
public boolean shouldHandleThisChat(AsyncPlayerChatEvent event)
|
||||||
{
|
{
|
||||||
return P.p.shouldLetFactionsHandleThisChat(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 FactionsChatListener.parseTags(message, event.getPlayer(), target);
|
return FactionsChatListener.parseTags(message, event.getPlayer(), target);
|
||||||
//return message.replace(Conf.chatTagReplaceString, P.p.getPlayerFactionTagRelation(event.getPlayer(), target)).replace("[FACTION_TITLE]", P.p.getPlayerTitle(event.getPlayer()));
|
//return message.replace(Conf.chatTagReplaceString, P.p.getPlayerFactionTagRelation(event.getPlayer(), target)).replace("[FACTION_TITLE]", P.p.getPlayerTitle(event.getPlayer()));
|
||||||
|
Loading…
Reference in New Issue
Block a user