aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/torui/coflsky/CoflSky.java
diff options
context:
space:
mode:
authorFlorian Rinke <develop@torui.de>2021-09-05 12:08:18 +0200
committerFlorian Rinke <develop@torui.de>2021-09-05 12:08:18 +0200
commitf88b74485ffdf42ca2b62c72fb746082e7fc012f (patch)
tree7c536169d9b50a098549daa469f970e672b3dd19 /src/main/java/de/torui/coflsky/CoflSky.java
parentd574e83ac221ce7b74756cfa8417904831ea245e (diff)
downloadCOFL-f88b74485ffdf42ca2b62c72fb746082e7fc012f.tar.gz
COFL-f88b74485ffdf42ca2b62c72fb746082e7fc012f.tar.bz2
COFL-f88b74485ffdf42ca2b62c72fb746082e7fc012f.zip
add to github
Diffstat (limited to 'src/main/java/de/torui/coflsky/CoflSky.java')
-rw-r--r--src/main/java/de/torui/coflsky/CoflSky.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/main/java/de/torui/coflsky/CoflSky.java b/src/main/java/de/torui/coflsky/CoflSky.java
new file mode 100644
index 0000000..3ef2119
--- /dev/null
+++ b/src/main/java/de/torui/coflsky/CoflSky.java
@@ -0,0 +1,42 @@
+package de.torui.coflsky;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import de.torui.coflsky.websocket.WSClient;
+import net.minecraft.init.Blocks;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.Mod.EventHandler;
+import net.minecraftforge.fml.common.event.FMLInitializationEvent;
+import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
+import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedOutEvent;
+
+@Mod(modid = CoflSky.MODID, version = CoflSky.VERSION)
+public class CoflSky
+{
+ public static final String MODID = "CoflSky";
+ public static final String VERSION = "1.0";
+
+ @EventHandler
+ public void init(FMLInitializationEvent event) throws URISyntaxException
+ {
+ // some example code
+ System.out.println("Initializing");
+
+ //new Thread(new WSClient(new URI("ws://localhost:8080"))).start();
+ System.out.println(">>>Started");
+
+ MinecraftForge.EVENT_BUS.register(new EventRegistry());
+ }
+
+
+ @EventHandler
+ public void init(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new CoflSkyCommand());
+ }
+
+}