From 63b7f85ac668381e0dbce510fc124de21501e14b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 14 Jan 2024 12:54:25 +1100 Subject: [PATCH] #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. By: Bjarne Koll --- .../java/org/bukkit/persistence/PersistentDataType.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/persistence/PersistentDataType.java b/paper-api/src/main/java/org/bukkit/persistence/PersistentDataType.java index f219d287e..2207ee985 100644 --- a/paper-api/src/main/java/org/bukkit/persistence/PersistentDataType.java +++ b/paper-api/src/main/java/org/bukkit/persistence/PersistentDataType.java @@ -87,9 +87,11 @@ public interface PersistentDataType { Complex Arrays. */ /** - * @deprecated Use {@link #LIST}'s {@link ListPersistentDataTypeProvider#dataContainers()} instead. + * @deprecated Use {@link #LIST}'s {@link ListPersistentDataTypeProvider#dataContainers()} instead as + * {@link ListPersistentDataType}s offer full support for primitive types, such as the + * {@link PersistentDataContainer}. */ - @ApiStatus.Obsolete + @Deprecated PersistentDataType TAG_CONTAINER_ARRAY = new PrimitivePersistentDataType<>(PersistentDataContainer[].class); /*