Interface ResourcePackOption<T>
- All Known Subinterfaces:
PriorityOption,SubpackOption,UrlFallbackOption
public interface ResourcePackOption<T>
Represents a resource pack option that can be used to specify how a resource
pack is sent to Bedrock clients.
Not all options can be applied to all resource packs. For example, you cannot specify
a specific subpack to be loaded on resource packs that do not have subpacks.
To see which limitations apply to specific resource pack options, check the javadocs
or see the validate(ResourcePack) method.
- Since:
- 2.6.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents the different types of resource pack options. -
Method Summary
Modifier and TypeMethodDescription@NonNull ResourcePackOption.Typetype()voidvalidate(@NonNull ResourcePack pack) Used to validate a specific options for a pack.@NonNull Tvalue()
-
Method Details
-
type
@NonNull ResourcePackOption.Type type()- Returns:
- the option type
- Since:
- 2.6.2
-
value
@NonNull T value()- Returns:
- the value of the option
- Since:
- 2.6.2
-
validate
Used to validate a specific options for a pack. Some options are not applicable to some packs.- Parameters:
pack- the resource pack to validate the option for- Throws:
ResourcePackException- with theResourcePackException.Cause.INVALID_PACK_OPTIONcause- Since:
- 2.6.2
-