diff options
author | Florian Rinke <develop@torui.de> | 2021-10-14 17:05:42 +0200 |
---|---|---|
committer | Florian Rinke <develop@torui.de> | 2021-10-14 17:05:42 +0200 |
commit | fd39e0b0f1318d5dfa0c2617e10d825710b7dd01 (patch) | |
tree | f9b3dbbd20fb05eed3f217acc099ebddeabc7a6e | |
parent | 7eacb4b62638c1ef5d5d23d7c2a8d8b0045e6bbc (diff) | |
download | COFL-fd39e0b0f1318d5dfa0c2617e10d825710b7dd01.tar.gz COFL-fd39e0b0f1318d5dfa0c2617e10d825710b7dd01.tar.bz2 COFL-fd39e0b0f1318d5dfa0c2617e10d825710b7dd01.zip |
refactor websocket package to network package
-rw-r--r-- | src/main/java/de/torui/coflsky/CoflSky.java | 2 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/CoflSkyCommand.java | 8 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/WSCommandHandler.java | 2 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/minecraft_integration/PlayerDataProvider.java | 3 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/network/NaiveSSLContext.java (renamed from src/main/java/de/torui/coflsky/websocket/NaiveSSLContext.java) | 2 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/network/QueryServerCommands.java (renamed from src/main/java/de/torui/coflsky/QueryServerCommands.java) | 4 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/network/WSClient.java (renamed from src/main/java/de/torui/coflsky/websocket/WSClient.java) | 2 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/network/WSClientWrapper.java (renamed from src/main/java/de/torui/coflsky/websocket/WSClientWrapper.java) | 2 |
8 files changed, 14 insertions, 11 deletions
diff --git a/src/main/java/de/torui/coflsky/CoflSky.java b/src/main/java/de/torui/coflsky/CoflSky.java index d625238..8ec8493 100644 --- a/src/main/java/de/torui/coflsky/CoflSky.java +++ b/src/main/java/de/torui/coflsky/CoflSky.java @@ -6,7 +6,7 @@ import java.net.URISyntaxException; import org.lwjgl.input.Keyboard; -import de.torui.coflsky.websocket.WSClientWrapper; +import de.torui.coflsky.network.WSClientWrapper; import net.minecraft.client.settings.KeyBinding; import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.common.MinecraftForge; diff --git a/src/main/java/de/torui/coflsky/CoflSkyCommand.java b/src/main/java/de/torui/coflsky/CoflSkyCommand.java index fa2dcf8..e48d131 100644 --- a/src/main/java/de/torui/coflsky/CoflSkyCommand.java +++ b/src/main/java/de/torui/coflsky/CoflSkyCommand.java @@ -9,8 +9,9 @@ import de.torui.coflsky.core.CommandType; import de.torui.coflsky.core.StringCommand; import de.torui.coflsky.minecraft_integration.CoflSessionManager; import de.torui.coflsky.minecraft_integration.CoflSessionManager.CoflSession; +import de.torui.coflsky.network.QueryServerCommands; +import de.torui.coflsky.network.WSClient; import de.torui.coflsky.minecraft_integration.PlayerDataProvider; -import de.torui.coflsky.websocket.WSClient; import net.minecraft.client.Minecraft; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -75,8 +76,9 @@ public class CoflSkyCommand extends CommandBase { break; case "debug": // WSCommandHandler.HandleCommand(new Command(CommandType.Execute, "/me hewwo"), sender.getCommandSenderEntity()); - // WSCommandHandler.HandleCommand(new Command(CommandType.WriteToChat, "{ \"text\": \"Clickable Texts are fun\", \"onClick\": \"me Hello World\"}"), sender.getCommandSenderEntity()); - WSCommandHandler.HandleCommand(new Command(CommandType.PlaySound, "{\"name\":\"random.orb\",\"pitch\":0.5}"), sender.getCommandSenderEntity()); + // WSCommandHandler.HandleCommand(new Command(CommandType.WriteToChat, " {\"type\":\"writeToChat\",\"data\":\"{\\\"text\\\":\\\"\\\\nFLIP: º9Goblin Eg\r\n" + // + "g º87,000 -> 13,999 ºg[BUY]\\\",\\\"onClick\\\":\\\"/viewauction f7d7295ca72f43e9876bf6da7424000c\\\",\\\"hover\\\":\\\"\\\"}\"}"), sender.getCommandSenderEntity()); + //WSCommandHandler.HandleCommand(new Command(CommandType.PlaySound, "{\"name\":\"random.orb\",\"pitch\":0.5}"), sender.getCommandSenderEntity()); break; case "callback": CallbackCommand(args); diff --git a/src/main/java/de/torui/coflsky/WSCommandHandler.java b/src/main/java/de/torui/coflsky/WSCommandHandler.java index eb18dfd..abffdf2 100644 --- a/src/main/java/de/torui/coflsky/WSCommandHandler.java +++ b/src/main/java/de/torui/coflsky/WSCommandHandler.java @@ -3,7 +3,7 @@ package de.torui.coflsky; import de.torui.coflsky.core.Command; import de.torui.coflsky.core.SoundCommand; import de.torui.coflsky.core.WriteToChatCommand; -import de.torui.coflsky.websocket.WSClient; +import de.torui.coflsky.network.WSClient; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.ISound; import net.minecraft.client.audio.PositionedSound; diff --git a/src/main/java/de/torui/coflsky/minecraft_integration/PlayerDataProvider.java b/src/main/java/de/torui/coflsky/minecraft_integration/PlayerDataProvider.java index 4c3c39b..ede60ce 100644 --- a/src/main/java/de/torui/coflsky/minecraft_integration/PlayerDataProvider.java +++ b/src/main/java/de/torui/coflsky/minecraft_integration/PlayerDataProvider.java @@ -9,8 +9,7 @@ import java.net.HttpURLConnection; import java.net.URL; import java.util.UUID; - -import de.torui.coflsky.websocket.WSClient; +import de.torui.coflsky.network.WSClient; import net.minecraft.client.Minecraft; public class PlayerDataProvider { diff --git a/src/main/java/de/torui/coflsky/websocket/NaiveSSLContext.java b/src/main/java/de/torui/coflsky/network/NaiveSSLContext.java index aea65c8..e5f7a95 100644 --- a/src/main/java/de/torui/coflsky/websocket/NaiveSSLContext.java +++ b/src/main/java/de/torui/coflsky/network/NaiveSSLContext.java @@ -1,4 +1,4 @@ -package de.torui.coflsky.websocket; +package de.torui.coflsky.network; /* * Copyright (C) 2015 Neo Visionaries Inc. * diff --git a/src/main/java/de/torui/coflsky/QueryServerCommands.java b/src/main/java/de/torui/coflsky/network/QueryServerCommands.java index a6a2f47..0bf54a3 100644 --- a/src/main/java/de/torui/coflsky/QueryServerCommands.java +++ b/src/main/java/de/torui/coflsky/network/QueryServerCommands.java @@ -1,4 +1,4 @@ -package de.torui.coflsky; +package de.torui.coflsky.network; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; @@ -11,6 +11,8 @@ import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import de.torui.coflsky.CoflSky; + public class QueryServerCommands { private static Gson gson = new GsonBuilder().create(); diff --git a/src/main/java/de/torui/coflsky/websocket/WSClient.java b/src/main/java/de/torui/coflsky/network/WSClient.java index 8adce9a..529056b 100644 --- a/src/main/java/de/torui/coflsky/websocket/WSClient.java +++ b/src/main/java/de/torui/coflsky/network/WSClient.java @@ -1,4 +1,4 @@ -package de.torui.coflsky.websocket; +package de.torui.coflsky.network; import java.io.IOException; import java.net.URI; diff --git a/src/main/java/de/torui/coflsky/websocket/WSClientWrapper.java b/src/main/java/de/torui/coflsky/network/WSClientWrapper.java index 30e5bc8..f30d0f9 100644 --- a/src/main/java/de/torui/coflsky/websocket/WSClientWrapper.java +++ b/src/main/java/de/torui/coflsky/network/WSClientWrapper.java @@ -1,4 +1,4 @@ -package de.torui.coflsky.websocket; +package de.torui.coflsky.network; import java.io.IOException; import java.net.URI; |