Commits

Bjarne Koll authored and md_5 committed 70be76c7be4
#958: Further clarify deprecation of TAG_CONTAINER_ARRAY

The commit expands on the deprecation reasoning for PersistentDataType#TAG_CONTAINER_ARRAY to make it more clear for people migrating their data as to why the data type is deprecated. The commit also moves the annotation from obsolete to deprecated. The special handling of this type in the pdc implementation is more annoying than anything else and should not be used down the line, making @Deprecated a more proper annotation for this field.
No tags

src/main/java/org/bukkit/persistence/PersistentDataType.java

Modified
80 80 Primitive Arrays.
81 81 */
82 82 PersistentDataType<byte[], byte[]> BYTE_ARRAY = new PrimitivePersistentDataType<>(byte[].class);
83 83 PersistentDataType<int[], int[]> INTEGER_ARRAY = new PrimitivePersistentDataType<>(int[].class);
84 84 PersistentDataType<long[], long[]> LONG_ARRAY = new PrimitivePersistentDataType<>(long[].class);
85 85
86 86 /*
87 87 Complex Arrays.
88 88 */
89 89 /**
90 - * @deprecated Use {@link #LIST}'s {@link ListPersistentDataTypeProvider#dataContainers()} instead.
90 + * @deprecated Use {@link #LIST}'s {@link ListPersistentDataTypeProvider#dataContainers()} instead as
91 + * {@link ListPersistentDataType}s offer full support for primitive types, such as the
92 + * {@link PersistentDataContainer}.
91 93 */
92 - @ApiStatus.Obsolete
94 + @Deprecated
93 95 PersistentDataType<PersistentDataContainer[], PersistentDataContainer[]> TAG_CONTAINER_ARRAY = new PrimitivePersistentDataType<>(PersistentDataContainer[].class);
94 96
95 97 /*
96 98 Nested PersistentDataContainer.
97 99 */
98 100 PersistentDataType<PersistentDataContainer, PersistentDataContainer> TAG_CONTAINER = new PrimitivePersistentDataType<>(PersistentDataContainer.class);
99 101
100 102 /**
101 103 * A data type provider type that itself cannot be used as a
102 104 * {@link PersistentDataType}.

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut