mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 08:11:31 +01:00
fixes
This commit is contained in:
parent
e59f74b885
commit
c52c6e4624
@ -439,7 +439,7 @@ public class Client {
|
|||||||
|
|
||||||
public PlayerResponse updateAccount() {
|
public PlayerResponse updateAccount() {
|
||||||
try {
|
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();
|
GsonBuilder builder = new GsonBuilder();
|
||||||
Gson gson = builder.create();
|
Gson gson = builder.create();
|
||||||
|
@ -91,6 +91,9 @@ public class Players {
|
|||||||
|
|
||||||
return result.isOnline() ? "true" : "false";
|
return result.isOnline() ? "true" : "false";
|
||||||
} else {
|
} else {
|
||||||
|
if(isLoading) {
|
||||||
|
return "false";
|
||||||
|
}
|
||||||
Players.isLoading = true;
|
Players.isLoading = true;
|
||||||
Client.logger.info("Loading Account of " + name.toLowerCase());
|
Client.logger.info("Loading Account of " + name.toLowerCase());
|
||||||
playersCache.put(name.toLowerCase(), null);
|
playersCache.put(name.toLowerCase(), null);
|
||||||
@ -132,7 +135,7 @@ public class Players {
|
|||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
try {
|
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);
|
Client.logger.info("STARTING > registering-player > response: " + content);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -143,7 +146,7 @@ public class Players {
|
|||||||
|
|
||||||
public static void unregister() {
|
public static void unregister() {
|
||||||
try {
|
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());
|
Client.logger.info("STOPPING > unregistering-player > response: " + content.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user