Catch null player in spigot-side command

This commit is contained in:
ajgeiss0702
2023-01-09 17:43:42 -07:00
parent 0a2db4f09a
commit 0f6f8a4230
@@ -53,10 +53,15 @@ public class Commands implements CommandExecutor {
player = tply; player = tply;
srvname = args[1]; srvname = args[1];
} }
if(player == null) {
sender.sendMessage("I need to know what player to send!");
return true;
}
if(pl.getAConfig().getBoolean("send-queue-commands-in-batches")) { if(pl.getAConfig().getBoolean("send-queue-commands-in-batches")) {
pl.queuebatch.put(player, srvname); pl.queuebatch.put(player, srvname);
} else { } else {
assert player != null;
pl.sendMessage(player, "queue", srvname); pl.sendMessage(player, "queue", srvname);
} }