Adding a permission for the /mchud command.

This commit is contained in:
Glitchfinder 2013-02-04 11:39:43 -08:00
parent fc40f545fe
commit ae5ab13533
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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: