Fix bug where players could know staff are invis (#4833)

* Fix bug where players could know staff are invis

* remove whitespace
This commit is contained in:
DarkKnights22 2022-12-04 22:21:22 +00:00 committed by GitHub
parent 93c64a8770
commit c865c2d2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,11 +85,19 @@ public class InspectCommand implements TabExecutor {
} }
} }
sender.sendMessage(LocaleLoader.getString("Inspect.Stats", target.getName())); if (isVanished) {
sender.sendMessage(LocaleLoader.getString("Inspect.OfflineStats", playerName));
} else {
sender.sendMessage(LocaleLoader.getString("Inspect.Stats", target.getName()));
}
CommandUtils.printGatheringSkills(target, sender); CommandUtils.printGatheringSkills(target, sender);
CommandUtils.printCombatSkills(target, sender); CommandUtils.printCombatSkills(target, sender);
CommandUtils.printMiscSkills(target, sender); CommandUtils.printMiscSkills(target, sender);
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", mcMMOPlayer.getPowerLevel()));
if (!isVanished) {
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", mcMMOPlayer.getPowerLevel()));
}
} }
return true; return true;