Restrict end to console only.
This commit is contained in:
parent
196612b259
commit
30330dd2bb
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user