Enum Class BlockInWorldPredicate.Result
java.lang.Object
java.lang.Enum<BlockInWorldPredicate.Result>
io.papermc.paper.command.brigadier.argument.predicate.BlockInWorldPredicate.Result
- All Implemented Interfaces:
Serializable
,Comparable<BlockInWorldPredicate.Result>
,Constable
- Enclosing interface:
BlockInWorldPredicate
The predicate result is yielded by the
BlockInWorldPredicate
when applied to a block.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe block passed to the predicate does not match the predicate.The block passed to the predicate matches the predicate.The block passed to the predicate was in an unloaded chunk and theloadChunk
flag was false. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Converts the result into an approximated boolean representation.static BlockInWorldPredicate.Result
Returns the enum constant of this class with the specified name.static BlockInWorldPredicate.Result[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TRUE
The block passed to the predicate matches the predicate. -
FALSE
The block passed to the predicate does not match the predicate. -
UNLOADED_CHUNK
The block passed to the predicate was in an unloaded chunk and theloadChunk
flag was false.
-
-
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
-
asBoolean
public boolean asBoolean()Converts the result into an approximated boolean representation. Specifically, the following mappings are applied:TRUE
->true
FALSE
->false
UNLOADED_CHUNK
->false
- Returns:
- the boolean representation.
-