diff options
Diffstat (limited to 'src/main/java/de/torui/coflsky/WSCommandHandler.java')
-rw-r--r-- | src/main/java/de/torui/coflsky/WSCommandHandler.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/de/torui/coflsky/WSCommandHandler.java b/src/main/java/de/torui/coflsky/WSCommandHandler.java index 0fc834f..616f860 100644 --- a/src/main/java/de/torui/coflsky/WSCommandHandler.java +++ b/src/main/java/de/torui/coflsky/WSCommandHandler.java @@ -8,6 +8,7 @@ import de.torui.coflsky.commands.JsonStringCommand; import de.torui.coflsky.commands.models.ChatMessageData; import de.torui.coflsky.commands.models.FlipData; import de.torui.coflsky.commands.models.SoundData; +import de.torui.coflsky.commands.models.TimerData; import de.torui.coflsky.network.WSClient; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; @@ -46,6 +47,10 @@ public class WSCommandHandler { break; case Flip: Flip(cmd.GetAs(new TypeToken<FlipData>() {})); + break; + case Countdown: + StartTimer(cmd.GetAs(new TypeToken<TimerData>() {})); + break; default: break; } @@ -83,9 +88,15 @@ public class WSCommandHandler { Execute(cmd.getData(),sender); } + /** + * Starts a countdown + */ + private static void StartTimer(Command<TimerData> cmd) { + CountdownTimer.startCountdown(cmd.getData()); + } + public static void Execute(String cmd, Entity sender) { - if(cmd.startsWith("/viewauction")){ String[] args = cmd.split(" "); |