Package | Description |
---|---|
com.comphenix.protocol.events | |
com.comphenix.protocol.wrappers | |
com.comphenix.protocol.wrappers.nbt | |
com.comphenix.protocol.wrappers.nbt.io |
Modifier and Type | Method and Description |
---|---|
StructureModifier<NbtBase<?>> |
PacketContainer.getNbtModifier()
Retrieves a read/write structure for NBT classes.
|
Modifier and Type | Method and Description |
---|---|
static EquivalentConverter<NbtBase<?>> |
BukkitConverters.getNbtConverter()
Retrieve an equivalent converter for net.minecraft.server NBT classes and their wrappers.
|
Modifier and Type | Interface and Description |
---|---|
interface |
NbtCompound
Represents a mapping of arbitrary NBT elements and their unique names.
|
interface |
NbtList<TType>
Represents a list of NBT tags of the same type without names.
|
interface |
NbtWrapper<TType>
Indicates that this NBT wraps an underlying net.minecraft.server instance.
|
Modifier and Type | Method and Description |
---|---|
NbtBase<TType> |
NbtBase.deepClone()
Clone the current NBT tag.
|
<T> NbtBase<T> |
NbtCompound.getValue(java.lang.String key)
Retrieve the value of a given entry.
|
NbtBase<?> |
NbtCompound.getValueOrDefault(java.lang.String key,
NbtType type)
Retrieve a value by its key, or assign and return a new NBT element if it doesn't exist.
|
static NbtBase<java.lang.Byte> |
NbtFactory.of(java.lang.String name,
byte value)
Constructs a NBT tag of type byte.
|
static NbtBase<byte[]> |
NbtFactory.of(java.lang.String name,
byte[] value)
Constructs a NBT tag of type byte array.
|
static NbtBase<java.lang.Double> |
NbtFactory.of(java.lang.String name,
double value)
Constructs a NBT tag of type double.
|
static NbtBase<java.lang.Float> |
NbtFactory.of(java.lang.String name,
float value)
Constructs a NBT tag of type float.
|
static NbtBase<java.lang.Integer> |
NbtFactory.of(java.lang.String name,
int value)
Constructs a NBT tag of type int.
|
static NbtBase<int[]> |
NbtFactory.of(java.lang.String name,
int[] value)
Constructs a NBT tag of type int array.
|
static NbtBase<java.lang.Long> |
NbtFactory.of(java.lang.String name,
long value)
Constructs a NBT tag of type long.
|
static NbtBase<java.lang.Short> |
NbtFactory.of(java.lang.String name,
short value)
Constructs a NBT tag of type short.
|
static NbtBase<java.lang.String> |
NbtFactory.of(java.lang.String name,
java.lang.String value)
Constructs a NBT tag of type string.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<NbtBase<TType>> |
NbtList.asCollection()
Retrieve each NBT tag in this list.
|
java.util.Iterator<NbtBase<?>> |
NbtCompound.iterator()
Retrieve an iterator view of the NBT tags stored in this compound.
|
Modifier and Type | Method and Description |
---|---|
void |
NbtList.add(NbtBase<TType> element)
Add a NBT list or NBT compound to the list.
|
static NbtCompound |
NbtFactory.asCompound(NbtBase<?> tag)
Attempt to cast this NBT tag as a compund.
|
static NbtList<?> |
NbtFactory.asList(NbtBase<?> tag)
Attempt to cast this NBT tag as a list.
|
static <T> NbtWrapper<T> |
NbtFactory.fromBase(NbtBase<T> base)
Get a NBT wrapper from a NBT base.
|
<T> NbtCompound |
NbtCompound.put(NbtBase<T> entry)
Set a entry based on its name.
|
NbtCompound |
NbtCompound.put(java.lang.String key,
NbtBase<?> entry)
Inserts an entry after cloning it and renaming it to "key".
|
boolean |
NbtVisitor.visit(NbtBase<?> node)
Visit a leaf node, which is a NBT tag with a primitive or String value.
|
Modifier and Type | Method and Description |
---|---|
static NbtCompound |
NbtFactory.ofCompound(java.lang.String name,
java.util.Collection<? extends NbtBase<?>> list)
Construct a new NBT compound initialized with a given list of NBT values.
|
<T> NbtCompound |
NbtCompound.put(java.lang.String key,
java.util.Collection<? extends NbtBase<T>> list)
Associate a new NBT list with the given key.
|
Modifier and Type | Method and Description |
---|---|
<TType> java.lang.String |
NbtTextSerializer.serialize(NbtBase<TType> value)
Serialize a NBT tag to a base-64 encoded string.
|
<TType> void |
NbtConfigurationSerializer.serialize(NbtBase<TType> value,
org.bukkit.configuration.ConfigurationSection destination)
Write the content of a NBT tag to a configuration section.
|
<TType> void |
NbtBinarySerializer.serialize(NbtBase<TType> value,
java.io.DataOutput destination)
Write the content of a wrapped NBT tag to a stream.
|