aboutsummaryrefslogtreecommitdiff
path: root/features/statHistoryGui
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-11 17:46:22 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-11 17:46:22 +0800
commit1a23a0071a1c220d0e70c99f9d71904f0635fad0 (patch)
tree8197710e3d9e75c2f271696ae96b6488ef120404 /features/statHistoryGui
parent4cfe8fd69d2d72df01dcc6804ab6b801e3890e73 (diff)
downloadSoopyV2-1a23a0071a1c220d0e70c99f9d71904f0635fad0.tar.gz
SoopyV2-1a23a0071a1c220d0e70c99f9d71904f0635fad0.tar.bz2
SoopyV2-1a23a0071a1c220d0e70c99f9d71904f0635fad0.zip
+ small bugfixes
Diffstat (limited to 'features/statHistoryGui')
-rw-r--r--features/statHistoryGui/index.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/features/statHistoryGui/index.js b/features/statHistoryGui/index.js
index bd9998b..5fe8356 100644
--- a/features/statHistoryGui/index.js
+++ b/features/statHistoryGui/index.js
@@ -101,22 +101,24 @@ class StatGraphPage extends GuiPage {
this.errorElm.setDesc("§0" + playerData.error.description)
return
}
+ this.statArea.clearChildren()
+ let nameElm = new SoopyTextElement().setText(playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")).setMaxTextScale(2).setLocation(0.1, 0.05, 0.8, 0.1)
+ this.statArea.addChild(nameElm)
+ this.statArea.addChild(this.loadingElm)
fetch("http://soopymc.my.to/api/v2/player_skyblock/" + playerData.data.uuid).json(skyblockData => {
if (player !== this.playerLoad) return
- this.statArea.clearChildren()
if (!skyblockData.success) {
+ this.statArea.clearChildren()
this.statArea.addChild(this.errorElm)
this.errorElm.setText("§0" + skyblockData.error.name)
this.errorElm.setDesc("§0" + skyblockData.error.description)
return
}
- let nameElm = new SoopyTextElement().setText(playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")).setMaxTextScale(2).setLocation(0.1, 0.05, 0.8, 0.1)
- this.statArea.addChild(nameElm)
fetch("http://soopymc.my.to/statgraphgenerations/" + playerData.data.uuid + "/" + skyblockData.data.stats.bestProfileId).json(graphData => {
if (player !== this.playerLoad) return