Skip to content

Commit

Permalink
complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekwav committed Jun 26, 2024
1 parent 0bcc6ee commit 5f67039
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
idea
java
id("gg.essential.loom") version "0.10.0.+"
id("dev.architectury.architectury-pack200") version "0.1.3"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/de/torui/coflsky/WSCommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import de.torui.coflsky.commands.models.*;
import de.torui.coflsky.configuration.ConfigurationManager;
import de.torui.coflsky.handlers.EventRegistry;
import de.torui.coflsky.handlers.EventHandler;
import de.torui.coflsky.proxy.ProxyManager;
import de.torui.coflsky.utils.FileUtils;
import de.torui.coflsky.commands.models.TimerData;
Expand Down Expand Up @@ -68,12 +69,16 @@ public static boolean HandleCommand(JsonStringCommand cmd, Entity sender) {
break;
case PrivacySettings:
new ConfigurationManager().UpdateConfiguration(cmd.getData());
EventHandler.UploadScoreboardData(); // on startup
break;
case Countdown:
StartTimer(cmd.GetAs(new TypeToken<TimerData>() {
}));
break;
case GetMods:
getMods();
case GetScoreboard:
EventHandler.UploadScoreboardData();
break;
case ProxyRequest:
handleProxyRequest(cmd.GetAs(new TypeToken<ProxyRequest[]>() {
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/de/torui/coflsky/commands/CommandType.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public enum CommandType {
@SerializedName("getMods")
GetMods,
@SerializedName("proxy")
ProxyRequest;
ProxyRequest,
@SerializedName("getScoreboard")
GetScoreboard;


public static Map<CommandType,String> data;
Expand Down

0 comments on commit 5f67039

Please sign in to comment.