This commit is contained in:
Brianna O'Keefe 2019-03-09 12:41:38 -05:00
parent 445ae829c8
commit ec07183495

View File

@ -32,7 +32,7 @@ public class CommandSpy extends AbstractCommand {
senderP.sendMessage(instance.getReferences().getPrefix() + instance.getLocale().getMessage("command.spy.cant"));
return;
}
boolean didVanish = false;
if (!CommandVanish.isVanished(senderP)) {
didVanish = true;
@ -65,6 +65,13 @@ public class CommandSpy extends AbstractCommand {
return ReturnType.SUCCESS;
}
Player player = Bukkit.getPlayer(args[0]);
if (player == null) {
sender.sendMessage(instance.getReferences().getPrefix() + "That player does not exist or is not online.");
return ReturnType.FAILURE;
}
spy(player, senderP);
return ReturnType.SUCCESS;