Catch null player in spigot-side command
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user