"mcmmo help" command no longer shows players the category for admin type commands if they lack permissions for said commands

This commit is contained in:
nossr50 2019-01-21 05:17:59 -08:00
parent 4f3174c68b
commit 11461cc220
2 changed files with 5 additions and 0 deletions

View File

@ -66,6 +66,7 @@ Version 2.1.0
= (Skills) Tridents will no longer be considered unarmed
= (MySQL) You can now inspect offline players
= (MySQL) When converting from MySQL to flatfile mcMMO will now properly include all users in the conversion process
= (Commands) '/mcMMO help' no longer displays the other/special commands category to players lacking permissions
+ (Party) Parties can now have size limits (configurable in config.yml), party size is unlimited by default
! (Deaths) Fixed the bug where mob names would be replaced by hearts
! (Experience) The XP values of fish are now based on their rarity and have been drastically changed

View File

@ -70,6 +70,10 @@ public class McmmoCommand implements CommandExecutor {
}
private void displayOtherCommands(CommandSender sender) {
//Don't show them this category if they have none of the permissions
if(!Permissions.skillreset(sender) && !Permissions.mmoedit(sender) && !Permissions.adminChat(sender) && !Permissions.mcgod(sender))
return;
sender.sendMessage(LocaleLoader.getString("Commands.Other"));
if (Permissions.skillreset(sender)) {