mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
This should make it work properly
This commit is contained in:
parent
fc0c386ecb
commit
de0487d16f
@ -69,11 +69,13 @@ public class InspectCommand implements TabExecutor {
|
|||||||
else {
|
else {
|
||||||
Player target = mcMMOPlayer.getPlayer();
|
Player target = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
if (!Permissions.inspectOffline(sender) && CommandUtils.hidden(sender, target, Permissions.inspectHidden(sender))) {
|
if (CommandUtils.hidden(sender, target, Permissions.inspectHidden(sender))) {
|
||||||
return true;
|
if (!Permissions.inspectOffline(sender)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else if (CommandUtils.tooFar(sender, target, Permissions.inspectFar(sender))) {
|
||||||
if (CommandUtils.tooFar(sender, target, Permissions.inspectFar(sender))) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,8 +56,7 @@ public final class CommandUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hidden(CommandSender sender, Player target, boolean hasPermission) {
|
public static boolean hidden(CommandSender sender, Player target, boolean hasPermission) {
|
||||||
if (sender instanceof Player && ((Player)sender).canSee(target) && !hasPermission) {
|
if (sender instanceof Player && !((Player)sender).canSee(target) && !hasPermission) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user