aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorÄkwav <ekwav@coflnet.com>2022-10-01 11:47:28 +0200
committerÄkwav <ekwav@coflnet.com>2022-10-01 11:47:28 +0200
commitcc9fefb3d39f08ae8354477702662fd523dcf0ce (patch)
treeb52c449f4efc06e8611924d8b3a4396ce72ad185 /src/main
parent3e2d251438e421c202bd49953467af47acfb4702 (diff)
downloadCOFL-cc9fefb3d39f08ae8354477702662fd523dcf0ce.tar.gz
COFL-cc9fefb3d39f08ae8354477702662fd523dcf0ce.tar.bz2
COFL-cc9fefb3d39f08ae8354477702662fd523dcf0ce.zip
make dev mode toggle and write target in chat
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/torui/coflsky/CoflSkyCommand.java11
1 files 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()));