aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/torui/coflsky/CoflSky.java
diff options
context:
space:
mode:
authorFlorian Rinke <develop@torui.de>2021-09-13 20:38:05 +0200
committerFlorian Rinke <develop@torui.de>2021-09-13 20:38:05 +0200
commit5dc63920c5f9e6dba1754b35e3224829c36d27ba (patch)
tree086701f9766c851e7207cc3c28e672555abdf1d4 /src/main/java/de/torui/coflsky/CoflSky.java
parentf88b74485ffdf42ca2b62c72fb746082e7fc012f (diff)
downloadCOFL-5dc63920c5f9e6dba1754b35e3224829c36d27ba.tar.gz
COFL-5dc63920c5f9e6dba1754b35e3224829c36d27ba.tar.bz2
COFL-5dc63920c5f9e6dba1754b35e3224829c36d27ba.zip
made command client side
Diffstat (limited to 'src/main/java/de/torui/coflsky/CoflSky.java')
-rw-r--r--src/main/java/de/torui/coflsky/CoflSky.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/de/torui/coflsky/CoflSky.java b/src/main/java/de/torui/coflsky/CoflSky.java
index 3ef2119..045b0fc 100644
--- a/src/main/java/de/torui/coflsky/CoflSky.java
+++ b/src/main/java/de/torui/coflsky/CoflSky.java
@@ -5,6 +5,7 @@ import java.net.URISyntaxException;
import de.torui.coflsky.websocket.WSClient;
import net.minecraft.init.Blocks;
+import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
@@ -13,13 +14,14 @@ 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;
+import net.minecraftforge.fml.relauncher.Side;
@Mod(modid = CoflSky.MODID, version = CoflSky.VERSION)
public class CoflSky
{
public static final String MODID = "CoflSky";
public static final String VERSION = "1.0";
-
+ public static WSClient WS;
@EventHandler
public void init(FMLInitializationEvent event) throws URISyntaxException
{
@@ -29,6 +31,7 @@ public class CoflSky
//new Thread(new WSClient(new URI("ws://localhost:8080"))).start();
System.out.println(">>>Started");
+ ClientCommandHandler.instance.registerCommand(new CoflSkyCommand());
MinecraftForge.EVENT_BUS.register(new EventRegistry());
}
@@ -36,7 +39,10 @@ public class CoflSky
@EventHandler
public void init(FMLServerStartingEvent event)
{
- event.registerServerCommand(new CoflSkyCommand());
+
+ if(event.getSide() == Side.CLIENT) return;
+ //event.registerServerCommand(new CoflSkyCommand());
}
}
+ \ No newline at end of file