mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-09 20:41:23 +01:00
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:
parent
fe1dd0d0f3
commit
8bec43f7a2
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user