Skip to content

Commit

Permalink
remove loren event
Browse files Browse the repository at this point in the history
  • Loading branch information
NopoTheGamer committed Oct 17, 2024
1 parent 8be81df commit 7f218d1
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 105 deletions.
4 changes: 1 addition & 3 deletions src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import at.hannibal2.skyhanni.data.jsonobjects.local.FriendsJson
import at.hannibal2.skyhanni.data.jsonobjects.local.JacobContestsJson
import at.hannibal2.skyhanni.data.jsonobjects.local.KnownFeaturesJson
import at.hannibal2.skyhanni.data.jsonobjects.local.VisualWordsJson
import at.hannibal2.skyhanni.events.LorenzEvent
import at.hannibal2.skyhanni.features.misc.update.UpdateManager
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
Expand Down Expand Up @@ -95,8 +94,7 @@ class ConfigManager {

try {
findPositionLinks(features, mutableSetOf())
} catch (e: Exception) {
if (LorenzEvent.isInGuardedEventHandler) throw e
} catch (_: Exception) {
}
}

Expand Down
92 changes: 0 additions & 92 deletions src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.events.player

import at.hannibal2.skyhanni.api.event.SkyHanniEvent
import at.hannibal2.skyhanni.events.SkyhanniChatEvent
import at.hannibal2.skyhanni.events.LorenzEvent

/**
* When the player "you" dies in the game. does not fire when other players die.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.events.render.gui

import at.hannibal2.skyhanni.api.event.SkyHanniEvent
import at.hannibal2.skyhanni.events.LorenzEvent
import net.minecraft.inventory.IInventory
import net.minecraft.inventory.InventoryBasic
import net.minecraft.item.ItemStack
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.utils
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigGuiManager
import at.hannibal2.skyhanni.config.HasLegacyId
import at.hannibal2.skyhanni.events.LorenzEvent
import at.hannibal2.skyhanni.test.command.ErrorManager
import com.google.gson.JsonArray
import com.google.gson.JsonElement
Expand Down Expand Up @@ -84,11 +83,6 @@ object ConfigUtils {

fun KMutableProperty0<*>.jumpToEditor() {
if (tryJumpToEditor(ConfigGuiManager.getEditorInstance())) return

// TODO create utils function "crashIfInDevEnv"
if (LorenzEvent.isInGuardedEventHandler) {
throw Error("can not jump to editor $name")
}
ErrorManager.logErrorStateWithData(
"Can not open the config",
"error while trying to jump to an editor element",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.config.features.dev.RepoPatternConfig
import at.hannibal2.skyhanni.data.repo.RepoManager
import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.LorenzEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.events.utils.PreInitFinishedEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
Expand Down Expand Up @@ -87,7 +86,7 @@ object RepoPatternManager {
* Crash if in a development environment, or if inside a guarded event handler.
*/
fun crash(reason: String) {
if (isInDevEnv || LorenzEvent.isInGuardedEventHandler)
if (isInDevEnv)
throw RuntimeException(reason)
}

Expand Down

0 comments on commit 7f218d1

Please sign in to comment.