mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +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 {
|
||||
Player target = mcMMOPlayer.getPlayer();
|
||||
|
||||
if (!Permissions.inspectOffline(sender) && CommandUtils.hidden(sender, target, Permissions.inspectHidden(sender))) {
|
||||
return true;
|
||||
if (CommandUtils.hidden(sender, target, Permissions.inspectHidden(sender))) {
|
||||
if (!Permissions.inspectOffline(sender)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (CommandUtils.tooFar(sender, target, Permissions.inspectFar(sender))) {
|
||||
else if (CommandUtils.tooFar(sender, target, Permissions.inspectFar(sender))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,7 @@ public final class CommandUtils {
|
||||
}
|
||||
|
||||
public static boolean hidden(CommandSender sender, Player target, boolean hasPermission) {
|
||||
if (sender instanceof Player && ((Player)sender).canSee(target) && !hasPermission) {
|
||||
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
||||
if (sender instanceof Player && !((Player)sender).canSee(target) && !hasPermission) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user