Enum EntityType

    • Method Detail

      • values

        public static EntityType[] 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 (EntityType c : EntityType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

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

        @Deprecated
        @Nullable
        public String getName()
        Deprecated.
        Magic value
        Returns:
        the entity type's name
      • getKey

        @NotNull
        public NamespacedKey getKey()
        Description copied from interface: Keyed
        Return the namespaced identifier for this object.
        Specified by:
        getKey in interface Keyed
        Returns:
        this object's key
      • getEntityClass

        @Nullable
        public Class<? extends Entity> getEntityClass()
      • getTypeId

        @Deprecated
        public short getTypeId()
        Deprecated.
        Magic value
        Returns:
        the raw type id
      • fromName

        @Deprecated
        @Contract("null -> null")
        @Nullable
        public static EntityType fromName​(@Nullable
                                          String name)
        Deprecated.
        Magic value
        Parameters:
        name - the entity type's name
        Returns:
        the matching entity type or null
      • fromId

        @Deprecated
        @Nullable
        public static EntityType fromId​(int id)
        Deprecated.
        Magic value
        Parameters:
        id - the raw type id
        Returns:
        the matching entity type or null
      • isAlive

        public boolean isAlive()