diff options
Diffstat (limited to 'src/main/java/de/torui/coflsky/commands/JsonStringCommand.java')
-rw-r--r-- | src/main/java/de/torui/coflsky/commands/JsonStringCommand.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/torui/coflsky/commands/JsonStringCommand.java b/src/main/java/de/torui/coflsky/commands/JsonStringCommand.java index 6bc22d8..a4ee15e 100644 --- a/src/main/java/de/torui/coflsky/commands/JsonStringCommand.java +++ b/src/main/java/de/torui/coflsky/commands/JsonStringCommand.java @@ -3,10 +3,12 @@ package de.torui.coflsky.commands; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; +import de.torui.coflsky.network.WSClient; + public class JsonStringCommand extends Command<String> { public JsonStringCommand(String type, String data) { - this.setType(CommandType.valueOf(type)); + this.setType(WSClient.gson.fromJson(type, CommandType.class)); this.setData(data); } |