diff --git a/modules/API/src/main/java/com/comphenix/protocol/events/PacketContainer.java b/modules/API/src/main/java/com/comphenix/protocol/events/PacketContainer.java index a3bb8660..d1fb1d35 100644 --- a/modules/API/src/main/java/com/comphenix/protocol/events/PacketContainer.java +++ b/modules/API/src/main/java/com/comphenix/protocol/events/PacketContainer.java @@ -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>> 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.