From 30330dd2bb2440c17ecf170408f438f291227ef4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 5 Oct 2012 15:59:14 +1000 Subject: [PATCH] Restrict end to console only. --- src/main/java/net/md_5/bungee/command/CommandEnd.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/md_5/bungee/command/CommandEnd.java b/src/main/java/net/md_5/bungee/command/CommandEnd.java index d0479e85..dc1aa0cf 100644 --- a/src/main/java/net/md_5/bungee/command/CommandEnd.java +++ b/src/main/java/net/md_5/bungee/command/CommandEnd.java @@ -1,11 +1,15 @@ package net.md_5.bungee.command; import net.md_5.bungee.BungeeCord; +import net.md_5.bungee.ChatColor; public class CommandEnd extends Command { @Override 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(); } }