File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/kotlin/com/mairwunnx/projectessentials/core/impl/vanilla/commands Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,13 @@ import net.minecraft.world.GameType
2121internal object GameModeCommand : VanillaCommandBase(" gamemode" ) {
2222 override fun register (dispatcher : CommandDispatcher <CommandSource >) {
2323 super .register(dispatcher).also { aliases() }
24+ // @formatter:off
2425 GameType .values().forEach {
25- if (! it.name.startsWith(" sp" )) short(" gm${it.getName()[0 ]} " , it) else short(" gmsp" , it)
26+ if (it != GameType .NOT_SET ) {
27+ if (! it.getName().startsWith(" sp" )) short(" gm${it.getName()[0 ]} " , it) else short(" gmsp" , it)
28+ }
2629 }
30+ // @formatter:on
2731 val literal = Commands .literal(name)
2832 GameType .values().forEach { type ->
2933 if (type != GameType .NOT_SET ) {
You can’t perform that action at this time.
0 commit comments