diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-19 02:13:25 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-19 02:13:25 +0100 |
commit | 8ccf6ff20ba0c698e97b270f7c91940d250659d0 (patch) | |
tree | cc1577c749d78923598726f996c3cc1b79930792 /src/main/java | |
parent | 02da989e0fef644e2b29f22823b71e4f13e518f0 (diff) | |
download | skyhanni-8ccf6ff20ba0c698e97b270f7c91940d250659d0.tar.gz skyhanni-8ccf6ff20ba0c698e97b270f7c91940d250659d0.tar.bz2 skyhanni-8ccf6ff20ba0c698e97b270f7c91940d250659d0.zip |
code cleanup
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt index 28deea65d..b1a02132f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt @@ -219,11 +219,13 @@ object GardenVisitorDropStatistics { @SubscribeEvent fun onConfigLoad(event: ConfigLoadEvent) { val storage = GardenAPI.storage?.visitorDrops ?: return - if (storage.visitorRarities.size == 0) { - storage.visitorRarities.add(0) - storage.visitorRarities.add(0) - storage.visitorRarities.add(0) - storage.visitorRarities.add(0) + val visitorRarities = storage.visitorRarities + if (visitorRarities.size == 0) { + visitorRarities.add(0) + visitorRarities.add(0) + visitorRarities.add(0) + visitorRarities.add(0) + visitorRarities.add(0) } acceptedVisitors = storage.acceptedVisitors deniedVisitors = storage.deniedVisitors |