diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-18 21:50:55 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-18 21:50:55 +0100 |
commit | 869d7a10cb1bf3d471655e96217325a767f7d943 (patch) | |
tree | bbab08516ae3351b883404944226a5d0a726b811 /src/main/java/at/hannibal2/skyhanni/test | |
parent | e3a83c160bebdc06b7597b9a19d406468d4b1305 (diff) | |
download | skyhanni-869d7a10cb1bf3d471655e96217325a767f7d943.tar.gz skyhanni-869d7a10cb1bf3d471655e96217325a767f7d943.tar.bz2 skyhanni-869d7a10cb1bf3d471655e96217325a767f7d943.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt b/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt index 3e5072fac..24edae9cc 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt @@ -47,18 +47,12 @@ object TestCopyBestiaryValues { if (!SkyHanniMod.feature.dev.debug.copyBestiaryData) return SkyHanniDebugsAndTests.displayLine = "" - val backItem = event.inventoryItems[3 + 9 * 5 + 3] - if (backItem == null) { - return - } + val backItem = event.inventoryItems[3 + 9 * 5 + 3] ?: return if (backItem.getLore().none { it.contains("Bestiary Milestone") }) { return } - val rankingItem = event.inventoryItems[3 + 9 * 5 + 2] - if (rankingItem == null) { - return - } + val rankingItem = event.inventoryItems[3 + 9 * 5 + 2] ?: return if (rankingItem.getLore().none { it.contains("Ranking") }) { return } @@ -71,7 +65,7 @@ object TestCopyBestiaryValues { val name = titleItem.name ?: return val titleName = name.split(" ").dropLast(1).joinToString(" ") - val obj: BestiarityObject = BestiarityObject() + val obj = BestiarityObject() obj.name = titleName obj.texture = titleItem.getSkullTexture() ?: "no texture found" obj.skullOwner = titleItem.getSkullOwner() ?: "no skullOwner found" @@ -116,4 +110,4 @@ object TestCopyBestiaryValues { fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(3, "dev.copyBestiaryData", "dev.debug.copyBestiaryData") } -}
\ No newline at end of file +} |