Skip to content

ValueType

Package: com.hypixel.hytale.server.npc.util.expression

public enum ValueType

Discriminant for the eight value types supported by the expression system. Used throughout the compiler, executor, and scope implementations to track operand types, validate assignments, and select instruction variants.

NameDescription
VOIDNo value / uninitialized.
NUMBERdouble scalar.
STRINGString scalar.
BOOLEANboolean scalar.
EMPTY_ARRAYEmpty array literal ([]), assignable to any typed array.
NUMBER_ARRAYdouble[] array.
STRING_ARRAYString[] array.
BOOLEAN_ARRAYboolean[] array.
ModifierReturn TypeSignature
public staticbooleanisAssignableType(@Nullable ValueType from, @Nullable ValueType to)
public staticbooleanisTypedArray(ValueType valueType)

isAssignableType returns true when from can be assigned to to. Both must be non-null and non-VOID, and either equal, or from is EMPTY_ARRAY and to is a typed array. isTypedArray returns true for BOOLEAN_ARRAY, NUMBER_ARRAY, and STRING_ARRAY.

Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.