mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-12-02 23:13:22 +01:00
DeathMessagesPrime message fix.
This commit is contained in:
parent
bdca07f1cf
commit
f2f8beb024
@ -19,7 +19,7 @@ package com.cnaude.purpleirc.GameListeners;
|
|||||||
import com.cnaude.purpleirc.PurpleBot;
|
import com.cnaude.purpleirc.PurpleBot;
|
||||||
import com.cnaude.purpleirc.PurpleIRC;
|
import com.cnaude.purpleirc.PurpleIRC;
|
||||||
import com.cnaude.purpleirc.TemplateName;
|
import com.cnaude.purpleirc.TemplateName;
|
||||||
import net.memmove.bukkit.deathmsg.DeathMessageBroadcastEvent;
|
import net.memmove.bukkit.deathmsg.DeathMessagePreparedEvent;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
@ -44,10 +44,11 @@ public class DeathMessagesPrimeListener implements Listener {
|
|||||||
* @param event
|
* @param event
|
||||||
*/
|
*/
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onDeathMessageEvent(DeathMessageBroadcastEvent event) {
|
public void onDeathMessageEvent(DeathMessagePreparedEvent event) {
|
||||||
plugin.logDebug("onDeathMessageBroadcastEvent caught");
|
String message = event.getMessage().duplicate().toLegacyText();
|
||||||
|
plugin.logDebug("onDeathMessageBroadcastEvent caught: " + message);
|
||||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||||
ircBot.gameDeath(event.getPlayer(), event.getMessage().getText(), TemplateName.DEATH_MESSAGES);
|
ircBot.gameDeath(event.getPlayer(), message, TemplateName.DEATH_MESSAGES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user