This should make it work properly

This commit is contained in:
TfT_02 2013-06-03 15:33:23 +02:00 committed by GJ
parent fc0c386ecb
commit de0487d16f
2 changed files with 7 additions and 6 deletions

View File

@ -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))) {
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;
}

View File

@ -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;
}