Fix for spy in gui.

This commit is contained in:
Brianna O'Keefe 2019-03-08 20:50:07 -05:00
parent f66a1db42d
commit 63a0bb285b
1 changed files with 6 additions and 5 deletions

View File

@ -19,7 +19,13 @@ public class CommandSpy extends AbstractCommand {
}
public static void spy(OfflinePlayer player, Player senderP) {
UltimateModeration instance = UltimateModeration.getInstance();
if (player == senderP) {
senderP.sendMessage(instance.getReferences().getPrefix() + "You cannot spy on yourself.");
return;
}
boolean didVanish = false;
if (!CommandVanish.isVanished(senderP)) {
didVanish = true;
@ -58,11 +64,6 @@ public class CommandSpy extends AbstractCommand {
return ReturnType.FAILURE;
}
if (player == senderP) {
sender.sendMessage(instance.getReferences().getPrefix() + "You cannot spy on yourself.");
return ReturnType.FAILURE;
}
spy(player, senderP);
return ReturnType.SUCCESS;