Enum Class XBlock.BlockTypeChangeException.Reason
java.lang.Object
java.lang.Enum<XBlock.BlockTypeChangeException.Reason>
com.cryptomorin.xseries.XBlock.BlockTypeChangeException.Reason
- All Implemented Interfaces:
Serializable, Comparable<XBlock.BlockTypeChangeException.Reason>, Constable
- Enclosing class:
XBlock.BlockTypeChangeException
public static enum XBlock.BlockTypeChangeException.Reason
extends Enum<XBlock.BlockTypeChangeException.Reason>
- Version:
- 4.1.0
- Author:
- Crypto Morin
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe material you used cannot be set as a block type (e.g.In older versions where the block state has to be changed, if the state change is unsuccessful, you'll get this error.In older versions when special material handling logic doesn't exist or can't be continued.The material you used is not supported in the current server version (i.e. -
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.
-
Enum Constant Details
-
UNSUPPORTED_MATERIAL
The material you used is not supported in the current server version (i.e.XBase.isSupported()) -
NOT_A_BLOCK
The material you used cannot be set as a block type (e.g.XMaterial.DIAMOND_SWORD) -
STATE_CHANGE_FAILURE
In older versions where the block state has to be changed, if the state change is unsuccessful, you'll get this error. This exception appearing is rare and can indicate a bug with the material logic XBlock uses for that version. -
UNEXPECTED_LOGIC
In older versions when special material handling logic doesn't exist or can't be continued. You normally shouldn't see this, because it'd be a bug.
-
-
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
-