Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend: Event Objects #2744

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading