This commit is contained in:
kirillsaint 2023-12-07 17:05:04 +06:00
parent e59f74b885
commit c52c6e4624
2 changed files with 6 additions and 3 deletions

View File

@ -439,7 +439,7 @@ public class Client {
public PlayerResponse updateAccount() {
try {
String content = Requests.post("https://api.silentclient.net/account/update", new JSONObject().append("server", Minecraft.getMinecraft().getCurrentServerData() != null ? Minecraft.getMinecraft().getCurrentServerData().serverIP : null).toString());
String content = Requests.post("https://api.silentclient.net/account/update", new JSONObject().put("server", Minecraft.getMinecraft().getCurrentServerData() != null ? Minecraft.getMinecraft().getCurrentServerData().serverIP : null).toString());
GsonBuilder builder = new GsonBuilder();
Gson gson = builder.create();

View File

@ -91,6 +91,9 @@ public class Players {
return result.isOnline() ? "true" : "false";
} else {
if(isLoading) {
return "false";
}
Players.isLoading = true;
Client.logger.info("Loading Account of " + name.toLowerCase());
playersCache.put(name.toLowerCase(), null);
@ -132,7 +135,7 @@ public class Players {
public static void register() {
try {
String content = Requests.post("https://api.silentclient.net/account/set_online", new JSONObject().append("online", true).toString());
String content = Requests.post("https://api.silentclient.net/account/set_online", new JSONObject().put("online", true).toString());
Client.logger.info("STARTING > registering-player > response: " + content);
} catch (Exception e) {
@ -143,7 +146,7 @@ public class Players {
public static void unregister() {
try {
String content = Requests.post("https://api.silentclient.net/account/set_online", new JSONObject().append("online", true).toString());
String content = Requests.post("https://api.silentclient.net/account/set_online", new JSONObject().put("online", true).toString());
Client.logger.info("STOPPING > unregistering-player > response: " + content.toString());
} catch (Exception e) {