diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-12-14 15:07:31 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-12-14 15:07:31 +0800 |
commit | 7b8088b0e901dd677972ae1cadc6447343c1e7d5 (patch) | |
tree | 9ddd6fefef609117f9792f6c2cf05b95380f5dee /features/hud | |
parent | d7c90e5a10ec1518974cdb1ee85506c28d31b2a1 (diff) | |
parent | 017c6f892afe12b53d7f6f0b17f4055468315dcb (diff) | |
download | SoopyV2-7b8088b0e901dd677972ae1cadc6447343c1e7d5.tar.gz SoopyV2-7b8088b0e901dd677972ae1cadc6447343c1e7d5.tar.bz2 SoopyV2-7b8088b0e901dd677972ae1cadc6447343c1e7d5.zip |
Merge branch 'master' of https://github.com/Soopyboo32/SoopyV2
Diffstat (limited to 'features/hud')
-rw-r--r-- | features/hud/HudTextElement.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/features/hud/HudTextElement.js b/features/hud/HudTextElement.js index 582b778..c5a0635 100644 --- a/features/hud/HudTextElement.js +++ b/features/hud/HudTextElement.js @@ -41,9 +41,16 @@ class HudTextElement{ getText(){ let text = this.text let blackText = this.blackText - if(this.editTempTextV && Date.now()-this.editTempTimeV < 100){ - text = this.editTempTextV - blackText = "&0" + ChatLib.removeFormatting(text) + if(Date.now()-this.editTempTimeV < 100){ + if(this.editTempTextV){ + text = this.editTempTextV + blackText = "&0" + ChatLib.removeFormatting(text) + } + + if(ChatLib.removeFormatting(text) === ""){ + text = "&0Empty string" + blackText = "&0Empty string" + } } return [text.split("\n"), blackText.split("\n")] } |