Archiviert
13
0

Merge pull request #265 from faradize/master

Added the ability of reading/writing lists of NBT classes!
Dieser Commit ist enthalten in:
Dan Mulloy 2016-09-11 17:00:25 -04:00 committet von GitHub
Commit 051989a396

Datei anzeigen

@ -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.