diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-25 19:45:40 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-25 19:45:40 +0200 |
commit | 02910648df3f49abeef2b71aa688415a807ea964 (patch) | |
tree | 8a531394b73f5913f1439e0fb2228a6af70e4d66 | |
parent | 30e53506fbd4ae9c914caaa15fcb4a78688c710a (diff) | |
download | skyhanni-02910648df3f49abeef2b71aa688415a807ea964.tar.gz skyhanni-02910648df3f49abeef2b71aa688415a807ea964.tar.bz2 skyhanni-02910648df3f49abeef2b71aa688415a807ea964.zip |
Fixed item rarity not detecting for shiny items.
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt index a9e6bc771..58370bc80 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt @@ -53,8 +53,9 @@ enum class LorenzRarity(val color: LorenzColor, val id: Int) { fun readItemRarity(itemStack: ItemStack): LorenzRarity? {
for (line in itemStack.getLore()) {
+ val string = line.replace("SHINY ", "")
for (rarity in LorenzRarity.entries) {
- if (line.startsWith(rarity.normalName) || line.startsWith(rarity.recombName)) {
+ if (string.startsWith(rarity.normalName) || string.startsWith(rarity.recombName)) {
return rarity
}
}
|