Fixed GamemodeCommand using capital letters instead of formatted letters
This commit is contained in:
parent
2284912b16
commit
189da92542
@ -1,6 +1,7 @@
|
|||||||
package eu.mhsl.minenet.minigames.command.admin;
|
package eu.mhsl.minenet.minigames.command.admin;
|
||||||
|
|
||||||
import net.minestom.server.command.builder.Command;
|
import net.minestom.server.command.builder.Command;
|
||||||
|
import net.minestom.server.command.builder.arguments.ArgumentEnum;
|
||||||
import net.minestom.server.command.builder.arguments.ArgumentType;
|
import net.minestom.server.command.builder.arguments.ArgumentType;
|
||||||
import net.minestom.server.entity.GameMode;
|
import net.minestom.server.entity.GameMode;
|
||||||
import net.minestom.server.entity.Player;
|
import net.minestom.server.entity.Player;
|
||||||
@ -11,6 +12,9 @@ public class GamemodeCommand extends Command {
|
|||||||
|
|
||||||
setCondition((sender, commandString) -> sender.hasPermission("admin"));
|
setCondition((sender, commandString) -> sender.hasPermission("admin"));
|
||||||
|
|
||||||
addSyntax((sender, context) -> ((Player) sender).setGameMode(context.get("target")), ArgumentType.Enum("target", GameMode.class));
|
addSyntax((sender, context) -> ((Player) sender).setGameMode(
|
||||||
|
context.get("target")),
|
||||||
|
ArgumentType.Enum("target", GameMode.class).setFormat(ArgumentEnum.Format.LOWER_CASED)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user