mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-22 23:31:37 +01:00
Add Boolean tag
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
97abccce0c
commit
1cdc0aeddb
@ -12,6 +12,7 @@ final class Serializers {
|
||||
static final Entry<TagHandlerImpl, NBTCompound> PATH = new Entry<>(TagHandlerImpl::fromCompound, TagHandlerImpl::asCompound);
|
||||
|
||||
static final Entry<Byte, NBTByte> BYTE = new Entry<>(NBTByte::getValue, NBT::Byte);
|
||||
static final Entry<Boolean, NBTByte> BOOLEAN = new Entry<>(NBTByte::asBoolean, NBT::Boolean);
|
||||
static final Entry<Short, NBTShort> SHORT = new Entry<>(NBTShort::getValue, NBT::Short);
|
||||
static final Entry<Integer, NBTInt> INT = new Entry<>(NBTInt::getValue, NBT::Int);
|
||||
static final Entry<Long, NBTLong> LONG = new Entry<>(NBTLong::getValue, NBT::Long);
|
||||
|
@ -245,6 +245,10 @@ public class Tag<T> {
|
||||
return tag(key, Serializers.BYTE);
|
||||
}
|
||||
|
||||
public static @NotNull Tag<Boolean> Boolean(@NotNull String key) {
|
||||
return tag(key, Serializers.BOOLEAN);
|
||||
}
|
||||
|
||||
public static @NotNull Tag<Short> Short(@NotNull String key) {
|
||||
return tag(key, Serializers.SHORT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user