From f1830199d99b666f28c2b3b246f688f102adb427 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Fri, 24 Jun 2022 23:44:58 +0700 Subject: TextHud revamp add docs to Hud fix config not saving when exiting prematurely some new events --- .../cc/polyfrost/oneconfig/events/event/PreShutdownEvent.java | 11 +++++++++++ .../cc/polyfrost/oneconfig/events/event/ShutdownEvent.java | 9 +++++++++ .../java/cc/polyfrost/oneconfig/events/event/StartEvent.java | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 src/main/java/cc/polyfrost/oneconfig/events/event/PreShutdownEvent.java create mode 100644 src/main/java/cc/polyfrost/oneconfig/events/event/ShutdownEvent.java create mode 100644 src/main/java/cc/polyfrost/oneconfig/events/event/StartEvent.java (limited to 'src/main/java/cc/polyfrost/oneconfig/events') diff --git a/src/main/java/cc/polyfrost/oneconfig/events/event/PreShutdownEvent.java b/src/main/java/cc/polyfrost/oneconfig/events/event/PreShutdownEvent.java new file mode 100644 index 0000000..105cfbc --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/events/event/PreShutdownEvent.java @@ -0,0 +1,11 @@ +package cc.polyfrost.oneconfig.events.event; + +/** + * Called when the game is about to shut down. + * This can be used if anything needs to be done before the screen itself is fully closed + * or need to do something before another mod does something via {@link Runtime#addShutdownHook(Thread)}. + * + * @see ShutdownEvent + */ +public class PreShutdownEvent { +} diff --git a/src/main/java/cc/polyfrost/oneconfig/events/event/ShutdownEvent.java b/src/main/java/cc/polyfrost/oneconfig/events/event/ShutdownEvent.java new file mode 100644 index 0000000..3f8ee50 --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/events/event/ShutdownEvent.java @@ -0,0 +1,9 @@ +package cc.polyfrost.oneconfig.events.event; + +/** + * Called when the game is shutting down. + * + * @see PreShutdownEvent + */ +public class ShutdownEvent { +} diff --git a/src/main/java/cc/polyfrost/oneconfig/events/event/StartEvent.java b/src/main/java/cc/polyfrost/oneconfig/events/event/StartEvent.java new file mode 100644 index 0000000..2eea91c --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/events/event/StartEvent.java @@ -0,0 +1,7 @@ +package cc.polyfrost.oneconfig.events.event; + +/** + * Called when the Minecraft instance is starting. + */ +public class StartEvent { +} -- cgit