aboutsummaryrefslogtreecommitdiff
path: root/socketConnection.js
diff options
context:
space:
mode:
Diffstat (limited to 'socketConnection.js')
-rw-r--r--socketConnection.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/socketConnection.js b/socketConnection.js
index 1cac07e..b844774 100644
--- a/socketConnection.js
+++ b/socketConnection.js
@@ -18,9 +18,15 @@ class SoopyV2Server extends WebsiteCommunicator {
this.reportErrorsSetting = undefined
this.onPlayerStatsLoaded = undefined
+
+ this.userCosmeticPermissions = undefined
}
onData(data){
+ if(data.type === "updateCosmeticPermissions"){
+ this.userCosmeticPermissions = data.permissions
+ Cosmetics.class.updateUserCosmeticPermissionSettings.call(Cosmetics.class)
+ }
if(data.type === "updateCosmetics"){
Cosmetics.class.setUserCosmeticsInformation.call(Cosmetics.class, data.uuid, data.cosmetics)
}
@@ -55,6 +61,13 @@ class SoopyV2Server extends WebsiteCommunicator {
}).start()
}
+ updateCosmeticsData(data){
+ this.sendData({
+ type: "cosmeticSettings",
+ data: data
+ })
+ }
+
sendMessageToServer(message, lobbyId){
this.sendData({
type: "chatMessage",