File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
modules/API/src/main/java/com/comphenix/protocol/events Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -520,6 +520,21 @@ public StructureModifier<NbtBase<?>> getNbtModifier() {
520
520
BukkitConverters .getNbtConverter ());
521
521
}
522
522
523
+ /**
524
+ * Retrieves a read/write structure for lists of NBT classes.
525
+ * @return A modifier for lists of NBT classes.
526
+ */
527
+ public StructureModifier <List <NbtBase <?>>> getListNbtModifier () {
528
+ // Convert to and from the ProtocolLib wrapper
529
+ return structureModifier .withType (
530
+ Collection .class ,
531
+ BukkitConverters .getListConverter (
532
+ MinecraftReflection .getNBTBaseClass (),
533
+ BukkitConverters .getNbtConverter ()
534
+ )
535
+ );
536
+ }
537
+
523
538
/**
524
539
* Retrieves a read/write structure for Vectors.
525
540
* @return A modifier for Vectors.
You can’t perform that action at this time.
0 commit comments