Allow /queue <player> <server> from console on the spigot side

This commit is contained in:
ajgeiss0702
2020-07-23 08:30:22 -07:00
parent a7c8db089a
commit 02eefe24d9
@@ -16,13 +16,17 @@ public class Commands implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(!(sender instanceof Player)) return true;
Player player = (Player) sender;
if(!(sender instanceof Player) && !(args.length > 1)) return true;
Player player = null;
if(sender instanceof Player) {
player = (Player) sender;
}
if(args.length < 1) return false;
String srvname = args[0];
if(args.length > 1) {
pl.getLogger().info("sending player to queue");
if(!sender.hasPermission("ajqueue.send")) {
sender.sendMessage(color("&cYou do not have permission to do this!"));
return true;