GameMode

public enum GameMode

Represents the various type of game modes that HumanEntitys may have

Entries

Link copied to clipboard

Creative mode may fly, build instantly, become invulnerable and create free items.

Link copied to clipboard

Survival mode is the "normal" gameplay type, with no special features.

Link copied to clipboard

Adventure mode cannot break blocks without the correct tools.

Link copied to clipboard

Spectator mode cannot interact with the world in anyway and is invisible to normal players. This grants the player the ability to no-clip through the world.

Properties

Link copied to clipboard
public final int value

Functions

Link copied to clipboard
public static GameMode valueOf(String name)

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
public static Array<GameMode> values()

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.