aboutsummaryrefslogtreecommitdiff
path: root/features/hud
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-13 20:56:06 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-13 20:56:06 +0800
commitf1e5f8810c4faf5a36d7b542d92284a3319d33ce (patch)
tree494189875108bc1c0d0955761239087adf406306 /features/hud
parent624dd350e350a619b8cd3874646ab2da493d3049 (diff)
downloadSoopyV2-f1e5f8810c4faf5a36d7b542d92284a3319d33ce.tar.gz
SoopyV2-f1e5f8810c4faf5a36d7b542d92284a3319d33ce.tar.bz2
SoopyV2-f1e5f8810c4faf5a36d7b542d92284a3319d33ce.zip
Finish v1 of senither leaderboard
Diffstat (limited to 'features/hud')
-rw-r--r--features/hud/HudTextElement.js13
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")]
}