diff options
author | Walker Selby <git@walkerselby.com> | 2023-10-28 19:10:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-28 20:10:18 +0200 |
commit | c1149d3c1b0d1f47bc6b0c1c65a70e5174022025 (patch) | |
tree | 6d9f56f4e170a2b67eeb6bb7793e4c41ff563395 /src/main | |
parent | b8bff2e2b2858b8f0136fe059cfae834f4a72936 (diff) | |
download | skyhanni-c1149d3c1b0d1f47bc6b0c1c65a70e5174022025.tar.gz skyhanni-c1149d3c1b0d1f47bc6b0c1c65a70e5174022025.tar.bz2 skyhanni-c1149d3c1b0d1f47bc6b0c1c65a70e5174022025.zip |
Deprecate string functions where InternalName should be used functions (#613)
Mark functions around item utils and neu items as deprecated. #613
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index f98a3a23a..d39587d4d 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -117,6 +117,7 @@ object ItemUtils { } // TODO remove + @Deprecated("Use NEUInternalName rather than String", ReplaceWith("getInternalName()")) fun ItemStack.getInternalName_old() = getInternalName().asString() fun ItemStack.getInternalName() = getInternalNameOrNull() ?: NEUInternalName.NONE diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index 641cd692e..3fa8a09ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -47,6 +47,7 @@ object NEUItems { } // TODO remove + @Deprecated("Use NEUInternalName rather than String", ReplaceWith("getInternalNameFromItemName()")) fun getRawInternalName(itemName: String): String { return getInternalNameFromItemName(itemName).asString() } @@ -174,6 +175,7 @@ object NEUItems { fun getItemStackOrNull(internalName: String) = internalName.asInternalName().getItemStackOrNull() // TODO remove + @Deprecated("Use NEUInternalName rather than String", ReplaceWith("getItemStack()")) fun getItemStack(internalName: String): ItemStack = internalName.asInternalName().getItemStack() |