aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/events
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-28 12:02:04 +0700
committerGitHub <noreply@github.com>2022-05-28 12:02:04 +0700
commit01e4c0dfb2a9726a9bf1c4d1a1fe28edbc3d094c (patch)
tree2949a7d1a9e6a5e9fbf6db983491ab813614b889 /src/main/java/cc/polyfrost/oneconfig/events
parent2f45fed981d7fcdf6e39791fecfa1dd410614fbf (diff)
downloadOneConfig-01e4c0dfb2a9726a9bf1c4d1a1fe28edbc3d094c.tar.gz
OneConfig-01e4c0dfb2a9726a9bf1c4d1a1fe28edbc3d094c.tar.bz2
OneConfig-01e4c0dfb2a9726a9bf1c4d1a1fe28edbc3d094c.zip
OC-32 OC-34 (#24)
* OC-34 hypixel utils class (#21) * OC-26 Build Workflow * OC-26 oops * OC-33 some networking utils * OC-34 idk * OC-34 idk * OC-34 restructure hypixel utils * hypixelutils and multithreading implement more events remove vcal icon stuff * more javadocs Co-authored-by: Ethan <git@ethanlibs.co>
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/events')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/events/EventManager.java12
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/events/event/ChatReceiveEvent.java12
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/events/event/LocrawEvent.java11
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/events/event/WorldLoadEvent.java4
4 files changed, 39 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/events/EventManager.java b/src/main/java/cc/polyfrost/oneconfig/events/EventManager.java
index 956c9b6..e1c1427 100644
--- a/src/main/java/cc/polyfrost/oneconfig/events/EventManager.java
+++ b/src/main/java/cc/polyfrost/oneconfig/events/EventManager.java
@@ -14,4 +14,16 @@ public final class EventManager {
public EventBus getEventBus() {
return eventBus;
}
+
+ public void register(Object object) {
+ eventBus.register(object);
+ }
+
+ public void unregister(Object object) {
+ eventBus.unregister(object);
+ }
+
+ public void post(Object event) {
+ eventBus.post(event);
+ }
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/events/event/ChatReceiveEvent.java b/src/main/java/cc/polyfrost/oneconfig/events/event/ChatReceiveEvent.java
new file mode 100644
index 0000000..b69b89b
--- /dev/null
+++ b/src/main/java/cc/polyfrost/oneconfig/events/event/ChatReceiveEvent.java
@@ -0,0 +1,12 @@
+package cc.polyfrost.oneconfig.events.event;
+
+
+import net.minecraft.util.IChatComponent;
+
+public class ChatReceiveEvent extends CancellableEvent {
+ public final IChatComponent message;
+
+ public ChatReceiveEvent(IChatComponent message) {
+ this.message = message;
+ }
+}
diff --git a/src/main/java/cc/polyfrost/oneconfig/events/event/LocrawEvent.java b/src/main/java/cc/polyfrost/oneconfig/events/event/LocrawEvent.java
new file mode 100644
index 0000000..42565f7
--- /dev/null
+++ b/src/main/java/cc/polyfrost/oneconfig/events/event/LocrawEvent.java
@@ -0,0 +1,11 @@
+package cc.polyfrost.oneconfig.events.event;
+
+import cc.polyfrost.oneconfig.utils.hypixel.LocrawInfo;
+
+public class LocrawEvent {
+ public final LocrawInfo info;
+
+ public LocrawEvent(LocrawInfo info) {
+ this.info = info;
+ }
+}
diff --git a/src/main/java/cc/polyfrost/oneconfig/events/event/WorldLoadEvent.java b/src/main/java/cc/polyfrost/oneconfig/events/event/WorldLoadEvent.java
new file mode 100644
index 0000000..1583fe6
--- /dev/null
+++ b/src/main/java/cc/polyfrost/oneconfig/events/event/WorldLoadEvent.java
@@ -0,0 +1,4 @@
+package cc.polyfrost.oneconfig.events.event;
+
+public class WorldLoadEvent {
+}