Enum Class ResourcePackStatusEvent.ResourcePackStatus
java.lang.Object
java.lang.Enum<ResourcePackStatusEvent.ResourcePackStatus>
org.spongepowered.api.event.entity.living.player.ResourcePackStatusEvent.ResourcePackStatus
- All Implemented Interfaces:
Serializable
,Comparable<ResourcePackStatusEvent.ResourcePackStatus>
,Constable
- Enclosing interface:
- ResourcePackStatusEvent
public static enum ResourcePackStatusEvent.ResourcePackStatus
extends Enum<ResourcePackStatusEvent.ResourcePackStatus>
The different possible responses the client can have.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe client is attempting to download the pack.The client declined to download the pack.The client failed to download the resource pack.The pack URI was successfully loaded. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.Gets if this status indicates that the pack was successfully set.
-
Enum Constant Details
-
ACCEPTED
The client is attempting to download the pack. -
DECLINED
The client declined to download the pack. -
FAILED
The client failed to download the resource pack.In some client versions, such as 1.8.0, this may only be sent when the resource pack URL does not end in
.zip
. Otherwise,SUCCESSFULLY_LOADED
will be sent. -
SUCCESSFULLY_LOADED
The pack URI was successfully loaded. This does not mean that pack was loaded, as the vanilla client sends this even when encountering a 404 or similar.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
wasSuccessful
Gets if this status indicates that the pack was successfully set.- Returns:
- true if it was successful, false if it was not, and Optional.empty() if it cannot be determined at this time.
-