aboutsummaryrefslogtreecommitdiff
path: root/features/cosmetics
diff options
context:
space:
mode:
Diffstat (limited to 'features/cosmetics')
-rw-r--r--features/cosmetics/index.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/features/cosmetics/index.js b/features/cosmetics/index.js
index f442c45..55e16fc 100644
--- a/features/cosmetics/index.js
+++ b/features/cosmetics/index.js
@@ -100,12 +100,6 @@ class Cosmetics extends Feature {
if(!this.enabled) return
uuid = uuid.replace(/-/g,"")
- if(!cosmetics){
- delete this.cosmeticsData[uuid]
- return
- }
- this.cosmeticsData[uuid] = cosmetics
-
this.loadedCosmetics = this.loadedCosmetics.filter(cosmetic=>{
if(cosmetic.player.getUUID().toString().replace(/-/g,"") === uuid){
return false
@@ -117,6 +111,12 @@ class Cosmetics extends Feature {
})
delete this.uuidToCosmeticDirect[uuid]
+
+ if(!cosmetics){
+ delete this.cosmeticsData[uuid]
+ return
+ }
+ this.cosmeticsData[uuid] = cosmetics
this.scanForNewCosmetics()
}