GameMode

A game mode that a player may be in that determines specific things to do with what the player is able to do, such as being able to build, fly, not take damage, or fly through walls.

Entries

Link copied to clipboard

Survival mode is the default game mode. In it, you can access most gameplay features, but you will take damage, and cannot fly.

Link copied to clipboard

Creative mode grants you access to spawn in any block in the game. It also grants you the ability to fly around the world freely, break blocks instantly, and you can only take damage from types that bypass invulnerability.

Link copied to clipboard

Adventure mode is designed for custom maps. In it, your block breaking and placing are restricted, you still take damage like normal, and you cannot fly.

Link copied to clipboard

Spectator mode is designed for spectating things. In it, you will take no damage from anything, not even types that bypass invulnerability, and you can fly through walls. You cannot interact with anything in the world, including breaking and placing blocks, attacking entities, and opening containers.

Functions

Link copied to clipboard
open override fun translationKey(): String
Link copied to clipboard
fun valueOf(value: String): GameMode

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard
Link copied to clipboard