Skip to content

Commit

Permalink
change SkyHanniEvents without a parameter to be objects instead of cl…
Browse files Browse the repository at this point in the history
…asses
  • Loading branch information
ItsEmpa committed Oct 16, 2024
1 parent faf84b6 commit 0dc5c9a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SkyHanniMod {

CommandRegistrationEvent.post()

PreInitFinishedEvent().post()
PreInitFinishedEvent.post()
}

@Mod.EventHandler
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object FmlEventApi {

@SubscribeEvent
fun onDisconnect(event: FMLNetworkEvent.ClientDisconnectionFromServerEvent) {
ClientDisconnectEvent().post()
ClientDisconnectEvent.post()
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package at.hannibal2.skyhanni.events.bingo

import at.hannibal2.skyhanni.api.event.SkyHanniEvent

class BingoCardUpdateEvent : SkyHanniEvent()
object BingoCardUpdateEvent : SkyHanniEvent()
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package at.hannibal2.skyhanni.events.garden.pests

import at.hannibal2.skyhanni.api.event.SkyHanniEvent

class PestUpdateEvent : SkyHanniEvent()
object PestUpdateEvent : SkyHanniEvent()
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package at.hannibal2.skyhanni.events.minecraft

import at.hannibal2.skyhanni.api.event.SkyHanniEvent

class ClientDisconnectEvent : SkyHanniEvent()
object ClientDisconnectEvent : SkyHanniEvent()
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package at.hannibal2.skyhanni.events.utils

import at.hannibal2.skyhanni.api.event.SkyHanniEvent

class PreInitFinishedEvent : SkyHanniEvent()
object PreInitFinishedEvent : SkyHanniEvent()
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ object BingoCardReader {
}
BingoAPI.lastBingoCardOpenTime = SimpleTimeMark.now()

BingoCardUpdateEvent().post()
BingoCardUpdateEvent.post()
}

private fun bingoGoalDifference(bingoGoal: BingoGoal, new: Double) {
Expand Down Expand Up @@ -163,7 +163,7 @@ object BingoCardReader {
val goal = BingoAPI.personalGoals.firstOrNull { it.displayName == name } ?: return
goal.done = true
BingoGoalReachedEvent(goal).post()
BingoCardUpdateEvent().post()
BingoCardUpdateEvent.post()
}

private fun BingoData.getDescriptionLine() = "§7" + note.joinToString(" ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ object PestAPI {
private fun updatePests() {
if (!firstScoreboardCheck) return
fixPests()
PestUpdateEvent().post()
PestUpdateEvent.post()
}

@HandleEvent(onlyOnIsland = IslandType.GARDEN)
Expand Down

0 comments on commit 0dc5c9a

Please sign in to comment.