Inspecting offline players no longer requires permissions + fixing

errors when using mcrank on an offline player
This commit is contained in:
nossr50
2019-06-17 08:19:15 -07:00
parent 4e4d798b1d
commit 38bc60ba86
7 changed files with 12 additions and 32 deletions

View File

@ -33,19 +33,6 @@ public final class CommandUtils {
return true;
}
public static boolean inspectOffline(CommandSender sender, PlayerProfile profile, boolean hasPermission) {
if (unloadedProfile(sender, profile)) {
return true;
}
if (!hasPermission) {
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
return true;
}
return false;
}
public static boolean tooFar(CommandSender sender, Player target, boolean hasPermission) {
if (sender instanceof Player && !Misc.isNear(((Player) sender).getLocation(), target.getLocation(), Config.getInstance().getInspectDistance()) && !hasPermission) {
sender.sendMessage(LocaleLoader.getString("Inspect.TooFar"));