mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07: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 {
|
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))) {
|
||||||
|
if (!Permissions.inspectOffline(sender)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (CommandUtils.tooFar(sender, target, Permissions.inspectFar(sender))) {
|
else 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