From cc9fefb3d39f08ae8354477702662fd523dcf0ce Mon Sep 17 00:00:00 2001 From: Äkwav Date: Sat, 1 Oct 2022 11:47:28 +0200 Subject: make dev mode toggle and write target in chat --- src/main/java/de/torui/coflsky/CoflSkyCommand.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/torui/coflsky/CoflSkyCommand.java b/src/main/java/de/torui/coflsky/CoflSkyCommand.java index 2cebb8f..de82f12 100644 --- a/src/main/java/de/torui/coflsky/CoflSkyCommand.java +++ b/src/main/java/de/torui/coflsky/CoflSkyCommand.java @@ -99,9 +99,14 @@ public class CoflSkyCommand extends CommandBase { CallbackCommand(args); break; case "dev": - CoflSky.Wrapper.initializeNewSocket("ws://localhost:8009/modsocket"); - Config.BaseUrl = "http://localhost:5005"; - System.out.println("entered dev mode"); + if(Config.BaseUrl.contains("localhost")) { + CoflSky.Wrapper.startConnection(); + Config.BaseUrl = "https://sky.coflnet.com"; + } else { + CoflSky.Wrapper.initializeNewSocket("ws://localhost:8009/modsocket"); + Config.BaseUrl = "http://localhost:5005"; + } + sender.addChatMessage(new ChatComponentText("toggled dev mode, now using " + Config.BaseUrl)); break; case "status": sender.addChatMessage(new ChatComponentText(StatusMessage())); -- cgit