Package net.fabricmc.fabric.api.resource
Enum ResourcePackActivationType
java.lang.Object
java.lang.Enum<ResourcePackActivationType>
net.fabricmc.fabric.api.resource.ResourcePackActivationType
- All Implemented Interfaces:
Serializable
,Comparable<ResourcePackActivationType>
,java.lang.constant.Constable
public enum ResourcePackActivationType extends Enum<ResourcePackActivationType>
Represents the resource pack activation type.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description ALWAYS_ENABLED
Always enabled.DEFAULT_ENABLED
Enabled by default.NORMAL
Normal activation. -
Method Summary
Modifier and Type Method Description boolean
isEnabledByDefault()
Returns whether this resource pack will be enabled by default or not.static ResourcePackActivationType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ResourcePackActivationType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NORMAL
Normal activation. The user has full control over the activation of the resource pack. -
DEFAULT_ENABLED
Enabled by default. The user has still full control over the activation of the resource pack.Note: this setting can only be satisfied on data packs, client resource packs cannot be by default enabled.
-
ALWAYS_ENABLED
Always enabled. The user cannot disable the resource pack.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-
isEnabledByDefault
public boolean isEnabledByDefault()Returns whether this resource pack will be enabled by default or not.- Returns:
true
if enabled by default, elsefalse
-