diff options
-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 |