Enum Class Gamemode

java.lang.Object
java.lang.Enum<Gamemode>
mindustry.game.Gamemode
All Implemented Interfaces:
Serializable, Comparable<Gamemode>, Constable

public enum Gamemode extends Enum<Gamemode>
Defines preset rule sets.
  • Enum Constant Details

    • survival

      public static final Gamemode survival
    • sandbox

      public static final Gamemode sandbox
    • attack

      public static final Gamemode attack
    • pvp

      public static final Gamemode pvp
    • editor

      public static final Gamemode editor
  • Field Details

    • hidden

      public final boolean hidden
    • all

      public static final Gamemode[] all
  • Method Details

    • values

      public static Gamemode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Gamemode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • apply

      public Rules apply(Rules in)
      Applies this preset to this ruleset.
    • valid

      public boolean valid(Map map)
      Returns:
      whether this mode can be played on the specified map.
    • description

      public String description()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Gamemode>