Enum Class EnumWrappers.NativeGameMode

java.lang.Object
java.lang.Enum<EnumWrappers.NativeGameMode>
com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode
All Implemented Interfaces:
Serializable, Comparable<EnumWrappers.NativeGameMode>, Constable
Enclosing class:
EnumWrappers

public static enum EnumWrappers.NativeGameMode extends Enum<EnumWrappers.NativeGameMode>
Represents a native game mode in Minecraft.

Not to be confused with GameMode in Bukkit.

  • Enum Constant Details

  • Method Details

    • values

      public static EnumWrappers.NativeGameMode[] 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 EnumWrappers.NativeGameMode 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
    • toBukkit

      public org.bukkit.GameMode toBukkit()
      Gets this NativeGameMode's Bukkit equivalent.

      Note: There is not a Bukkit equivalent for NOT_SET or NONE

      Returns:
      The Bukkit equivalent, or null if one does not exist.
    • fromBukkit

      public static EnumWrappers.NativeGameMode fromBukkit(org.bukkit.GameMode mode)
      Obtains the given GameMode's NativeGameMode equivalent.
      Parameters:
      mode - Bukkit GameMode
      Returns:
      The NativeGameMode equivalent, or null if one does not exist.