Restrict end to console only.

This commit is contained in:
md_5 2012-10-05 15:59:14 +10:00
parent 196612b259
commit 30330dd2bb

View File

@ -1,11 +1,15 @@
package net.md_5.bungee.command; package net.md_5.bungee.command;
import net.md_5.bungee.BungeeCord; import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.ChatColor;
public class CommandEnd extends Command { public class CommandEnd extends Command {
@Override @Override
public void execute(CommandSender sender, String[] args) { public void execute(CommandSender sender, String[] args) {
if (!(sender instanceof ConsoleCommandSender)) {
sender.sendMessage(ChatColor.RED + "Only the console can use this command");
}
BungeeCord.instance.stop(); BungeeCord.instance.stop();
} }
} }