mirror of
https://github.com/songoda/UltimateModeration.git
synced 2025-02-12 09:31:24 +01:00
Fix for spy in gui.
This commit is contained in:
parent
f66a1db42d
commit
63a0bb285b
@ -19,7 +19,13 @@ public class CommandSpy extends AbstractCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void spy(OfflinePlayer player, Player senderP) {
|
public static void spy(OfflinePlayer player, Player senderP) {
|
||||||
|
|
||||||
|
|
||||||
UltimateModeration instance = UltimateModeration.getInstance();
|
UltimateModeration instance = UltimateModeration.getInstance();
|
||||||
|
if (player == senderP) {
|
||||||
|
senderP.sendMessage(instance.getReferences().getPrefix() + "You cannot spy on yourself.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean didVanish = false;
|
boolean didVanish = false;
|
||||||
if (!CommandVanish.isVanished(senderP)) {
|
if (!CommandVanish.isVanished(senderP)) {
|
||||||
didVanish = true;
|
didVanish = true;
|
||||||
@ -58,11 +64,6 @@ public class CommandSpy extends AbstractCommand {
|
|||||||
return ReturnType.FAILURE;
|
return ReturnType.FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player == senderP) {
|
|
||||||
sender.sendMessage(instance.getReferences().getPrefix() + "You cannot spy on yourself.");
|
|
||||||
return ReturnType.FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
spy(player, senderP);
|
spy(player, senderP);
|
||||||
|
|
||||||
return ReturnType.SUCCESS;
|
return ReturnType.SUCCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user