mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 06:51:32 +01:00
Update PlayerResponse.java
This commit is contained in:
parent
c52c6e4624
commit
81cfd55955
@ -1,6 +1,9 @@
|
||||
package net.silentclient.client.utils.types;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.mixin.ducks.AbstractClientPlayerExt;
|
||||
import net.silentclient.client.utils.NotificationUtils;
|
||||
import net.silentclient.client.utils.Players;
|
||||
import net.silentclient.client.utils.Requests;
|
||||
@ -99,7 +102,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
}
|
||||
|
||||
public void updateFavorite(int id, String type) {
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("updateFavorite") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/update_favorite_cosmetics", new JSONObject().put("id", id).put("type", type).toString());
|
||||
@ -110,7 +116,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
|
||||
public void setBandanaColor(int color) {
|
||||
this.bandana_color = color;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread() {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/plus/set_bandana_color", new JSONObject().put("color", color).toString());
|
||||
@ -154,7 +163,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
public void setShowNametagMessage(boolean show) {
|
||||
this.show_nametag_message = show ? 1 : 0;
|
||||
Players.reload();
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setShowNametagMessage") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/plus/set_nametag_message", new JSONObject().put("enabled", show).toString());
|
||||
@ -166,7 +178,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
public void setNametagMessage(String message) {
|
||||
this.nametag_message = message;
|
||||
Players.reload();
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
String response = Requests.post("https://api.silentclient.net/plus/set_nametag_message", new JSONObject().put("message", message).toString());
|
||||
if(response != null) {
|
||||
NotificationUtils.showNotification("success", "Nametag Message updated successfully!");
|
||||
@ -182,7 +197,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
|
||||
public void setCapeShoulders(boolean shoulders) {
|
||||
this.cape_shoulders = shoulders ? 1 : 0;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setShoulders") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/set_cape_shoulders", new JSONObject().put("enabled", shoulders).toString());
|
||||
@ -195,7 +213,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
|
||||
public void setCapeType(String type) {
|
||||
this.cape_type = type;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setCapeType") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/set_cape_type", new JSONObject().put("type", type).toString());
|
||||
@ -287,7 +308,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
public void setSelectedBandana(int id) {
|
||||
final int bandanaId = id == this.selected_bandana ? 0 : id;
|
||||
this.selected_bandana = bandanaId;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setBandana") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/select_bandana", new JSONObject().put("id", bandanaId).toString());
|
||||
@ -314,7 +338,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
break;
|
||||
}
|
||||
final int cid = hatId;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setHat") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/select_hat", new JSONObject().put("id", cid).put("type", type).toString());
|
||||
@ -327,7 +354,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
public void setSelectedShield(int id) {
|
||||
final int hatId = id == this.selected_shield ? 0 : id;
|
||||
this.selected_shield = hatId;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setShield") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/select_shield", new JSONObject().put("id", hatId).toString());
|
||||
@ -344,7 +374,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
public void setSelectedCape(int id) {
|
||||
final int capeId = id == this.selected_cape ? 0 : id;
|
||||
this.selected_cape = capeId;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setCapeRequest") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/select_cape", new JSONObject().put("id", capeId).toString());
|
||||
@ -361,7 +394,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
public void setSelectedWings(int id) {
|
||||
final int wingsId = id == this.selected_wings ? 0 : id;
|
||||
this.selected_wings = wingsId;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setWingsRequest") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/select_wings", new JSONObject().put("id", wingsId).toString());
|
||||
@ -378,7 +414,10 @@ public class PlayerResponse extends AbstractReply {
|
||||
public void setSelectedIcon(int id) {
|
||||
final int iconId = id == this.selected_icon ? 0 : id;
|
||||
this.selected_icon = iconId;
|
||||
Players.handleAccount(this);
|
||||
Players.reload();
|
||||
if(Minecraft.getMinecraft().thePlayer != null) {
|
||||
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
(new Thread("setIconRequest") {
|
||||
public void run() {
|
||||
Requests.post("https://api.silentclient.net/account/select_icon", new JSONObject().put("id", iconId).toString());
|
||||
|
Loading…
Reference in New Issue
Block a user