Enum GameType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<GameType>

    public enum GameType
    extends java.lang.Enum<GameType>
    • Enum Constant Detail

      • NOT_SET

        public static final GameType NOT_SET
      • SURVIVAL

        public static final GameType SURVIVAL
      • CREATIVE

        public static final GameType CREATIVE
      • ADVENTURE

        public static final GameType ADVENTURE
      • SPECTATOR

        public static final GameType SPECTATOR
    • Field Detail

      • id

        private final int id
      • name

        private final java.lang.String name
    • Constructor Detail

      • GameType

        private GameType​(int p_i48711_3_,
                         java.lang.String p_i48711_4_)
    • Method Detail

      • values

        public static GameType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GameType c : GameType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GameType valueOf​(java.lang.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.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getId

        public int getId()
      • getName

        public java.lang.String getName()
      • updatePlayerAbilities

        public void updatePlayerAbilities​(PlayerAbilities p_77147_1_)
      • isBlockPlacingRestricted

        public boolean isBlockPlacingRestricted()
      • isCreative

        public boolean isCreative()
      • isSurvival

        public boolean isSurvival()
      • byId

        public static GameType byId​(int p_77146_0_)
      • byId

        public static GameType byId​(int p_185329_0_,
                                    GameType p_185329_1_)
      • byName

        public static GameType byName​(java.lang.String p_77142_0_)
      • byName

        public static GameType byName​(java.lang.String p_185328_0_,
                                      GameType p_185328_1_)