diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-08 18:45:20 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-08 18:45:20 +0800 |
commit | 70c3730c9ecded83c64ffe4b32b729dd985ba0e9 (patch) | |
tree | 2d2b26e7108ee4eaed1e9015730aabf29d4d9bba /features/stat_next_to_name/index.js | |
parent | 4aa9741c0ae9fa9e8199b697e4af8bec9d3e7db1 (diff) | |
download | SoopyV2-70c3730c9ecded83c64ffe4b32b729dd985ba0e9.tar.gz SoopyV2-70c3730c9ecded83c64ffe4b32b729dd985ba0e9.tar.bz2 SoopyV2-70c3730c9ecded83c64ffe4b32b729dd985ba0e9.zip |
fire freeze timer
Diffstat (limited to 'features/stat_next_to_name/index.js')
-rw-r--r-- | features/stat_next_to_name/index.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/features/stat_next_to_name/index.js b/features/stat_next_to_name/index.js index 46a7c8b..ad6a68f 100644 --- a/features/stat_next_to_name/index.js +++ b/features/stat_next_to_name/index.js @@ -147,7 +147,7 @@ class StatNextToName extends Feature { nameTagString += " &2[" if (stats.usingSoopyv2) nameTagString += "&d⚝&2" - if (stats.exists && stats[this.statToShow.getValue()]) { + if (stats.exists && stats[this.statToShow.getValue()] !== undefined && stats[this.statToShow.getValue()] !== null) { if (this.decimals[this.statToShow.getValue()] === "small") { nameTagString += numberUtils.addNotation("oneLetters", Math.round(stats[this.statToShow.getValue()])) } else { @@ -174,6 +174,14 @@ class StatNextToName extends Feature { playerStatsLoaded(stats) { stats.bestiary /= 10 this.userStats[stats.uuid] = stats + + + World.getAllPlayers().forEach(player => { + if (player.getUUID().toString().replace(/-/g, "") === stats.uuid) { + this.updatePlayerNametag(player) + return + } + }) } onDisable() { |