- All Superinterfaces:
BinaryTag,BinaryTagLike
- All Known Subinterfaces:
ByteBinaryTag,DoubleBinaryTag,FloatBinaryTag,IntBinaryTag,LongBinaryTag,ShortBinaryTag
public sealed interface NumberBinaryTag
extends BinaryTag
permits ByteBinaryTag, DoubleBinaryTag, FloatBinaryTag, IntBinaryTag, LongBinaryTag, ShortBinaryTag
A numeric binary tag.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbyteGets the value as abyte.doubleGets the value as adouble.floatGets the value as afloat.intintValue()Gets the value as aint.longGets the value as along.Gets the value as aNumber.shortGets the value as ashort.BinaryTagType<? extends NumberBinaryTag> type()Gets the tag type.Methods inherited from interface net.kyori.adventure.nbt.BinaryTag
asBinaryTag
-
Method Details
-
type
BinaryTagType<? extends NumberBinaryTag> type()Description copied from interface:BinaryTagGets the tag type. -
byteValue
byte byteValue()Gets the value as abyte.- Returns:
- the value as a
byte - Since:
- 4.0.0
-
doubleValue
double doubleValue()Gets the value as adouble.- Returns:
- the value as a
double - Since:
- 4.0.0
-
floatValue
float floatValue()Gets the value as afloat.- Returns:
- the value as a
float - Since:
- 4.0.0
-
intValue
int intValue()Gets the value as aint.- Returns:
- the value as a
int - Since:
- 4.0.0
-
longValue
long longValue()Gets the value as along.- Returns:
- the value as a
long - Since:
- 4.0.0
-
shortValue
short shortValue()Gets the value as ashort.- Returns:
- the value as a
short - Since:
- 4.0.0
-
numberValue
Number numberValue()Gets the value as aNumber.- Returns:
- the value as a
Number - Since:
- 4.21.0
-