Class NBTCompound
java.lang.Object
com.github.retrooper.packetevents.protocol.nbt.NBT
com.github.retrooper.packetevents.protocol.nbt.NBTCompound
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()
boolean
boolean
getBoolean
(String string) boolean
getBooleanOr
(String string, boolean defaultValue) @Nullable NBTList
<NBTCompound> @Nullable NBTCompound
<T> @Nullable List
<T> getListOr
(String key, NbtDecoder<T> decoder, @Nullable List<T> def, PacketWrapper<?> wrapper) <T> List
<T> getListOrEmpty
(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper) <T> @Nullable List
<T> getListOrNull
(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper) <T> List
<T> getListOrThrow
(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper) @Nullable NBTNumber
getNumberTagOrNull
(String key) @Nullable Number
getNumberTagValueOrDefault
(String key, @Nullable Number number) @Nullable Number
<T> T
getOr
(String key, NbtDecoder<T> decoder, T def, PacketWrapper<?> wrapper) <T> T
getOrNull
(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper) <T> T
getOrThrow
(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper) @Nullable NBTString
getStringTagOrNull
(String key) getStringTagValueOrDefault
(String key, String defaultValue) @Nullable String
getTagListOfTypeOrNull
(String key, Class<T> type) getTagListOfTypeOrThrow
(String key, Class<T> type) <T extends NBT>
TgetTagOfTypeOrNull
(String key, Class<T> type) <T extends NBT>
TgetTagOfTypeOrThrow
(String key, Class<T> type) @Nullable NBT
getTagOrNull
(String key) getTagOrThrow
(String key) getTags()
getType()
int
hashCode()
boolean
isEmpty()
removeTagAndReturnIfListType
(String key, Class<T> type) <T extends NBT>
TremoveTagAndReturnIfType
(String key, Class<T> type) <T> void
set
(String key, T value, NbtEncoder<T> encoder, PacketWrapper<?> wrapper) <T> void
setCompactList
(String key, List<T> value, NbtEncoder<T> encoder, PacketWrapper<?> wrapper) <T> void
setList
(String key, List<T> value, NbtEncoder<T> encoder, PacketWrapper<?> wrapper) void
int
size()
toString()
-
Field Details
-
tags
-
-
Constructor Details
-
NBTCompound
public NBTCompound()
-
-
Method Details
-
getType
-
isEmpty
public boolean isEmpty() -
getTagNames
-
getTags
-
size
public int size() -
getTagOrThrow
-
getTagOrNull
-
getTagOfTypeOrThrow
-
getTagOfTypeOrNull
-
getTagListOfTypeOrThrow
-
getTagListOfTypeOrNull
-
getCompoundTagOrThrow
-
getCompoundTagOrNull
-
getNumberTagValueOrThrow
-
getNumberTagValueOrNull
-
getNumberTagValueOrDefault
-
getNumberTagOrThrow
-
getNumberTagOrNull
-
getStringTagOrThrow
-
getStringTagOrNull
-
getCompoundListTagOrThrow
-
getCompoundListTagOrNull
-
getNumberTagListTagOrThrow
-
getNumberListTagOrNull
-
getStringListTagOrThrow
-
getStringListTagOrNull
-
getStringTagValueOrThrow
-
getStringTagValueOrNull
-
getStringTagValueOrDefault
-
removeTag
-
removeTagAndReturnIfType
-
removeTagAndReturnIfListType
-
setTag
-
copy
-
getBoolean
-
getBooleanOr
-
getOr
@Contract("_, _, !null, _ -> !null") @Nullable public <T> T getOr(String key, NbtDecoder<T> decoder, @Nullable T def, PacketWrapper<?> wrapper) -
getOrNull
-
getOrThrow
-
getListOr
@Contract("_, _, !null, _ -> !null") @Nullable public <T> @Nullable List<T> getListOr(String key, NbtDecoder<T> decoder, @Nullable @Nullable List<T> def, PacketWrapper<?> wrapper) -
getListOrNull
@Nullable public <T> @Nullable List<T> getListOrNull(String key, NbtDecoder<T> decoder, PacketWrapper<?> wrapper) -
getListOrEmpty
-
getListOrThrow
-
set
-
setList
-
setCompactList
public <T> void setCompactList(String key, List<T> value, NbtEncoder<T> encoder, PacketWrapper<?> wrapper) -
equals
-
hashCode
public int hashCode() -
toString
-