From a7bbbf0ce78ef4ac2c0033c0e7309f5ad7354b0f Mon Sep 17 00:00:00 2001 From: Doc Date: Wed, 27 Sep 2023 07:09:58 +1000 Subject: [PATCH] #911: Expand DataPack API with 1.20.2 pack version methods Co-authored-by: 2008Choco --- src/main/java/org/bukkit/packs/DataPack.java | 34 +++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/bukkit/packs/DataPack.java b/src/main/java/org/bukkit/packs/DataPack.java index a0631038..3d5af25a 100644 --- a/src/main/java/org/bukkit/packs/DataPack.java +++ b/src/main/java/org/bukkit/packs/DataPack.java @@ -31,16 +31,42 @@ public interface DataPack extends Keyed { public String getDescription(); /** - * Gets the pack version. + * Gets the pack format. *
- * This is related to the server version to work. + * Pack formats are non-standard and unrelated to the version of Minecraft. For + * a list of known pack versions, see the + * Minecraft Wiki. * * @return the pack version - * @deprecated packs can support multiple versions + * @see #getMinSupportedPackFormat() + * @see #getMaxSupportedPackFormat() */ - @Deprecated public int getPackFormat(); + /** + * Gets the minimum supported pack format. If the data pack does not specify a + * minimum supported format, {@link #getPackFormat()} is returned. + *
+ * Pack formats are non-standard and unrelated to the version of Minecraft. For + * a list of known pack versions, see the + * Minecraft Wiki. + * + * @return the min pack version supported + */ + public int getMinSupportedPackFormat(); + + /** + * Gets the maximum supported pack format. If the data pack does not specify a + * maximum supported format, {@link #getPackFormat()} is returned. + *
+ * Pack formats are non-standard and unrelated to the version of Minecraft. For + * a list of known pack versions, see the + * Minecraft Wiki. + * + * @return the max pack version supported + */ + public int getMaxSupportedPackFormat(); + /** * Gets if the data pack is enabled on the server. *