aboutsummaryrefslogtreecommitdiff
path: root/features/stat_next_to_name/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-01-11 05:03:00 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-01-11 05:03:00 +0800
commit1ecfecc53f68a9ee371bf105eb8a656e0a98c5b3 (patch)
tree1c8436eda071169a5bb89d902bee091985edfa49 /features/stat_next_to_name/index.js
parent5a018f398d2de5351778af35306f387eadcceb68 (diff)
downloadSoopyV2-1ecfecc53f68a9ee371bf105eb8a656e0a98c5b3.tar.gz
SoopyV2-1ecfecc53f68a9ee371bf105eb8a656e0a98c5b3.tar.bz2
SoopyV2-1ecfecc53f68a9ee371bf105eb8a656e0a98c5b3.zip
+ Warning message when cannot connect to soopy server
+ Museum gui performance improvements + HUD api stat thingo + Settings for slayer features actually toggle things + Stat next to name loading time optimisations (should help if you are in a party)
Diffstat (limited to 'features/stat_next_to_name/index.js')
-rw-r--r--features/stat_next_to_name/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/features/stat_next_to_name/index.js b/features/stat_next_to_name/index.js
index c76ecd7..c38fcc7 100644
--- a/features/stat_next_to_name/index.js
+++ b/features/stat_next_to_name/index.js
@@ -29,6 +29,7 @@ class StatNextToName extends Feature {
"networth": "small"
}
+ this.oldUserStats = {}
this.userStats = {}
this.loadingStats = []
@@ -45,7 +46,7 @@ class StatNextToName extends Feature {
let nearestDistance = Infinity
World.getAllPlayers().forEach(player => {
- if(this.userStats[player.getUUID().toString().replace(/-/g, "")]){
+ if(this.userStats[player.getUUID().toString().replace(/-/g, "")] || this.oldUserStats[player.getUUID().toString().replace(/-/g, "")]){
this.updatePlayerNametag(player)
return
}
@@ -67,6 +68,7 @@ class StatNextToName extends Feature {
worldLoad(){
let playerStats = this.userStats[Player.getUUID().toString().replace(/-/g, "")]
+ this.oldUserStats = this.userStats
this.userStats = {}
this.loadingStats = []
if(playerStats){
@@ -75,7 +77,7 @@ class StatNextToName extends Feature {
}
updatePlayerNametag(player){
- let stats = this.userStats[player.getUUID().toString().replace(/-/g, "")]
+ let stats = this.userStats[player.getUUID().toString().replace(/-/g, "")] || this.oldUserStats[player.getUUID().toString().replace(/-/g, "")]
let nameTagString = player.getName()