New permission for changing all gamemodes. Fixes #79.

Need to give players essentials.gamemode.all or each gamemode permission on top of essentials.gamemode to be able to change.
This commit is contained in:
drtshock 2015-08-07 16:54:08 -05:00
parent fe1dd0d0f3
commit 8bec43f7a2

View File

@ -89,7 +89,7 @@ public class Commandgamemode extends EssentialsCommand {
// essentials.gamemode will let them change to any but essentials.gamemode.survival would only let them change to survival.
private boolean canChangeToMode(Player player, GameMode to) {
return player.hasPermission("essentials.gamemode") || player.hasPermission("essentials.gamemode." + to.name().toLowerCase());
return player.hasPermission("essentials.gamemode.all") || player.hasPermission("essentials.gamemode." + to.name().toLowerCase());
}
private GameMode matchGameMode(String modeString) throws NotEnoughArgumentsException {