diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/hoppity/EggFoundEvent.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/hoppity/EggFoundEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/hoppity/EggFoundEvent.kt index 2cd81811f..30cd282ac 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/hoppity/EggFoundEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/hoppity/EggFoundEvent.kt @@ -5,6 +5,6 @@ import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggType class EggFoundEvent( val type: HoppityEggType, - val slotIndex: Int?, - val note: String?, + val slotIndex: Int? = null, + val note: String? = null, ) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt index 881b8b5e7..09c0dedf9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt @@ -105,13 +105,13 @@ object HoppityAPI { ChocolateFactoryStrayTracker.handleStrayClicked(it) when (groupOrNull("name") ?: return@matchMatcher) { "Fish the Rabbit" -> { - EggFoundEvent(STRAY, it.slotNumber, null).post() + EggFoundEvent(STRAY, it.slotNumber).post() lastName = "§9Fish the Rabbit" lastMeal = STRAY attemptFireRabbitFound() } "El Dorado" -> { - EggFoundEvent(STRAY, it.slotNumber, null).post() + EggFoundEvent(STRAY, it.slotNumber).post() lastName = "§6El Dorado" lastMeal = STRAY attemptFireRabbitFound() @@ -132,7 +132,7 @@ object HoppityAPI { val nameText = (if (clickedStack.hasDisplayName()) clickedStack.displayName else clickedStack.itemName) sideDishNamePattern.matchMatcher(nameText) { - EggFoundEvent(SIDE_DISH, index, null).post() + EggFoundEvent(SIDE_DISH, index).post() lastMeal = SIDE_DISH attemptFireRabbitFound() } @@ -140,12 +140,12 @@ object HoppityAPI { clickedStack.getLore().let { if (!it.any { line -> line == "§eClick to claim!" }) return allTimeLorePattern.firstMatcher(it) { - EggFoundEvent(CHOCOLATE_FACTORY_MILESTONE, index, null).post() + EggFoundEvent(CHOCOLATE_FACTORY_MILESTONE, index).post() lastMeal = CHOCOLATE_FACTORY_MILESTONE attemptFireRabbitFound() } shopLorePattern.firstMatcher(it) { - EggFoundEvent(CHOCOLATE_SHOP_MILESTONE, index, null).post() + EggFoundEvent(CHOCOLATE_SHOP_MILESTONE, index).post() lastMeal = CHOCOLATE_SHOP_MILESTONE attemptFireRabbitFound() } @@ -160,14 +160,14 @@ object HoppityAPI { eggFoundPattern.matchMatcher(event.message) { resetRabbitData() lastMeal = getEggType(event) - lastMeal?.let { EggFoundEvent(it, null, groupOrNull("note")).post() } + lastMeal?.let { EggFoundEvent(it, note = groupOrNull("note")).post() } attemptFireRabbitFound() } HoppityEggsManager.eggBoughtPattern.matchMatcher(event.message) { if (group("rabbitname").equals(lastName)) { lastMeal = HoppityEggType.BOUGHT - EggFoundEvent(HoppityEggType.BOUGHT, null, null).post() + EggFoundEvent(HoppityEggType.BOUGHT).post() attemptFireRabbitFound() } } |