changed craftscore version
This commit is contained in:
parent
47dfcd5202
commit
b98cc644f1
2 changed files with 11 additions and 11 deletions
|
@ -17,7 +17,7 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
implementation 'de.craftsblock:craftsnet:3.2.0-SNAPSHOT'
|
||||
implementation 'de.craftsblock.craftscore:CraftsCore:3.7.53-SNAPSHOT'
|
||||
implementation 'de.craftsblock.craftscore:CraftsCore:3.7.60-SNAPSHOT'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||
implementation 'com.google.code.gson:gson:2.10'
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ public class CosmeticSocket implements SocketHandler, ListenerAdapter {
|
|||
public void handleMessage(SocketExchange exchange, String message) throws IOException {
|
||||
WebSocketClient client = exchange.client();
|
||||
if (!Validator.isJsonValid(message)) {
|
||||
client.sendMessage(JsonParser.parse("{}")
|
||||
.set("error", "Send data must be in JSON format")
|
||||
.asString());
|
||||
Json jsonerr = JsonParser.parse("{}");
|
||||
jsonerr.set("error", "Send data must be in JSON format");
|
||||
client.sendMessage(jsonerr.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -40,11 +40,11 @@ public class CosmeticSocket implements SocketHandler, ListenerAdapter {
|
|||
|
||||
JsonObject cosmetic = searchServerCosmetic(type, name);
|
||||
|
||||
Json result = Json.empty()
|
||||
.set("id", data.getLong("id"))
|
||||
.set("search", type)
|
||||
.set("name", name)
|
||||
.set("result", false);
|
||||
Json result = JsonParser.parse("{}");
|
||||
result.set("id", data.getLong("id"));
|
||||
result.set("search", type);
|
||||
result.set("name", name);
|
||||
result.set("result", false);
|
||||
|
||||
if (cosmetic != null) {
|
||||
result.set("result", cosmetic);
|
||||
|
@ -67,7 +67,7 @@ public class CosmeticSocket implements SocketHandler, ListenerAdapter {
|
|||
exchange.broadcast(JsonParser.parse("{}")
|
||||
.set("uuid", uuid.toString())
|
||||
.set("cosmetics", bakeData(cosmetics))
|
||||
.asString());
|
||||
.toString());
|
||||
clients.put(client, mapping);
|
||||
CosmeticSocket.cosmetics.put(uuid, mapping);
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class CosmeticSocket implements SocketHandler, ListenerAdapter {
|
|||
|
||||
client.sendMessage(JsonParser.parse("{}")
|
||||
.set("data", array)
|
||||
.asString());
|
||||
.toString());
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue