From bba5fa5f3ea7a191ec80139a9ddb1bcbefa90772 Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Sat, 26 Nov 2022 20:24:14 +0100 Subject: [PATCH] Adds additional information for deprecations as JavaDocs --- .../com/songoda/core/compatibility/MethodMapping.java | 3 +++ Core/src/main/java/com/songoda/core/SongodaCore.java | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/Compatibility/src/main/java/com/songoda/core/compatibility/MethodMapping.java b/Compatibility/src/main/java/com/songoda/core/compatibility/MethodMapping.java index 0a2b2033..8796a48e 100644 --- a/Compatibility/src/main/java/com/songoda/core/compatibility/MethodMapping.java +++ b/Compatibility/src/main/java/com/songoda/core/compatibility/MethodMapping.java @@ -5,6 +5,9 @@ import org.bukkit.inventory.ItemStack; import java.lang.reflect.Method; +/** + * @deprecated Horrible to maintain, and it gets worse with every new Minecraft version. Should be replaced with NMS + */ @Deprecated public enum MethodMapping { MC_ITEM_STACK__GET_TAG("getTag", "getTag", "s", "t", "u"), diff --git a/Core/src/main/java/com/songoda/core/SongodaCore.java b/Core/src/main/java/com/songoda/core/SongodaCore.java index 6bd5d123..22473541 100644 --- a/Core/src/main/java/com/songoda/core/SongodaCore.java +++ b/Core/src/main/java/com/songoda/core/SongodaCore.java @@ -61,6 +61,7 @@ public class SongodaCore { /** * This is specific to the website api + * @deprecated Seems useless and will probably be removed in the near future */ @Deprecated private static final int updaterVersion = 1; @@ -235,6 +236,9 @@ public class SongodaCore { tasks.add(Bukkit.getScheduler().runTaskLaterAsynchronously(plugin, () -> update(info), 60L)); } + /** + * @deprecated Seems useless and will probably be replaced in the near future + */ @Deprecated private void update(PluginInfo plugin) { try { @@ -293,6 +297,9 @@ public class SongodaCore { return coreRevision; } + /** + * @deprecated Use {@link #getVersion()} instead + */ @Deprecated public static String getCoreLibraryVersion() { return SongodaCoreConstants.getCoreVersion(); @@ -307,6 +314,10 @@ public class SongodaCore { return -1; } + /** + * @deprecated Seems useless and will probably be removed in the near future + */ + @Deprecated public static int getUpdaterVersion() { return updaterVersion; }