diff --git a/src/main/java/com/gmail/nossr50/spout/commands/MchudCommand.java b/src/main/java/com/gmail/nossr50/spout/commands/MchudCommand.java index e2e155fe3..394a9a2a8 100644 --- a/src/main/java/com/gmail/nossr50/spout/commands/MchudCommand.java +++ b/src/main/java/com/gmail/nossr50/spout/commands/MchudCommand.java @@ -12,6 +12,7 @@ import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.spout.SpoutConfig; import com.gmail.nossr50.spout.huds.HudType; import com.gmail.nossr50.spout.huds.SpoutHud; +import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Users; public class MchudCommand implements CommandExecutor { @@ -24,6 +25,10 @@ public class MchudCommand implements CommandExecutor { return true; } + if (!Permissions.hasPermission(sender, "mcmmo.commands.mchud")) { + return true; + } + if (!mcMMO.spoutEnabled || !SpoutConfig.getInstance().getXPBarEnabled()) { sender.sendMessage(LocaleLoader.getString("Commands.Disabled")); return true; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 5d4116368..c52eac9df 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -728,6 +728,7 @@ permissions: mcmmo.commands.herbalism: true mcmmo.commands.inspect: true mcmmo.commands.mcability: true + mcmmo.commands.mchud: true mcmmo.commands.mcmmo: true mcmmo.commands.mcrank: true mcmmo.commands.mcstats: true @@ -792,6 +793,8 @@ permissions: description: Allows access to the mcgod command mcmmo.commands.mcgod.others: description: Allows access to the mcgod command for other players + mcmmo.commands.mchud: + description: Allows access to the mchud command mcmmo.commands.mcmmo: description: Allows access to the mcmmo command mcmmo.commands.mcpurge: