Added death messages (#12)
This commit is contained in:
parent
630384f125
commit
696f359f50
1 changed files with 7 additions and 2 deletions
|
@ -3,9 +3,9 @@ package buttondevteam.discordplugin.listeners;
|
|||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.server.ServerCommandEvent;
|
||||
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import buttondevteam.discordplugin.DiscordPlayer;
|
||||
import buttondevteam.discordplugin.DiscordPlugin;
|
||||
import buttondevteam.discordplugin.commands.ConnectCommand;
|
||||
|
@ -48,4 +48,9 @@ public class MCListener implements Listener {
|
|||
+ user.getStatus().getUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onPlayerDeath(PlayerDeathEvent e) {
|
||||
DiscordPlugin.sendMessageToChannel(DiscordPlugin.chatchannel, e.getDeathMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue