Merge pull request #265 from faradize/master
Added the ability of reading/writing lists of NBT classes!
Dieser Commit ist enthalten in:
Commit
051989a396
@ -520,6 +520,21 @@ public class PacketContainer implements Serializable {
|
||||
BukkitConverters.getNbtConverter());
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for lists of NBT classes.
|
||||
* @return A modifier for lists of NBT classes.
|
||||
*/
|
||||
public StructureModifier<List<NbtBase<?>>> getListNbtModifier() {
|
||||
// Convert to and from the ProtocolLib wrapper
|
||||
return structureModifier.withType(
|
||||
Collection.class,
|
||||
BukkitConverters.getListConverter(
|
||||
MinecraftReflection.getNBTBaseClass(),
|
||||
BukkitConverters.getNbtConverter()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a read/write structure for Vectors.
|
||||
* @return A modifier for Vectors.
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren