mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-07 04:53:11 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
// 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) {
|
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 {
|
private GameMode matchGameMode(String modeString) throws NotEnoughArgumentsException {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue