Removed server shutdown message

This commit is contained in:
Norbi Peti 2016-11-26 15:36:46 +01:00
parent 7de50eb00d
commit cadd04ccd1

View file

@ -15,23 +15,6 @@ import sx.blah.discord.handle.obj.IUser;
import sx.blah.discord.handle.obj.Status.StatusType; import sx.blah.discord.handle.obj.Status.StatusType;
public class MCListener implements Listener { public class MCListener implements Listener {
@EventHandler
public void onServerCommandPreprocess(ServerCommandEvent e) {
if (!DiscordPlugin.dc.isReady())
return;
try {
if (e.getCommand().equalsIgnoreCase("stop"))
DiscordPlugin.sendMessageToChannel(DiscordPlugin.botchannel, "Minecraft server shutting down!");
/*
* else if (e.getCommand().equalsIgnoreCase("restart"))
* DiscordPlugin.sendMessageToChannel(DiscordPlugin.botchannel,
* "Minecraft server restarting");
*/
} catch (Exception ex) {
ex.printStackTrace();
}
}
@EventHandler @EventHandler
public void onPlayerJoin(TBMCPlayerJoinEvent e) { public void onPlayerJoin(TBMCPlayerJoinEvent e) {
final Player p = Bukkit.getPlayer(e.GetPlayer().getUuid()); final Player p = Bukkit.getPlayer(e.GetPlayer().getUuid());