aboutsummaryrefslogtreecommitdiff
path: root/features/globalSettings/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-08-10 21:24:10 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-08-10 21:24:10 +0800
commitf8a0c81f37ff4f726ca18408c3d5772f0794d749 (patch)
tree8bb91f1177b5a7a4f85984dc47ff1a6a6ce8b59b /features/globalSettings/index.js
parent32367f35133cc3f4583d2bf42ea2e5777c3ac46c (diff)
downloadSoopyV2-f8a0c81f37ff4f726ca18408c3d5772f0794d749.tar.gz
SoopyV2-f8a0c81f37ff4f726ca18408c3d5772f0794d749.tar.bz2
SoopyV2-f8a0c81f37ff4f726ca18408c3d5772f0794d749.zip
fix enchant thing + tall gui + meta
Diffstat (limited to 'features/globalSettings/index.js')
-rw-r--r--features/globalSettings/index.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index 69da074..f5913ff 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -201,9 +201,11 @@ class GlobalSettings extends Feature {
}
updateItemLores() {
- if (!this.itemWorth.getValue()) return;
+ if (!this.itemWorth.getValue() && !this.showChampion.getValue() && !this.showHecatomb.getValue()) return;
- [...Player.getInventory().getItems(), ...Player.getContainer().getItems()].forEach(i => {
+ let items = [...Player.getInventory().getItems(), ...Player.getContainer().getItems()]
+
+ items.forEach(i => {
let uuid = getSBUUID(i)
if (!uuid) return
@@ -217,15 +219,15 @@ class GlobalSettings extends Feature {
if (a) {
addLore(i, "§eWorth: ", "§6$" + numberWithCommas(Math.round(a)))
- return
- }
-
- if (this.requestingPrices.has(uuid)) return
+ } else {
+ if (!this.requestingPrices.has(uuid)) {
+ this.requestingPrices.add(uuid)
- this.requestingPrices.add(uuid)
+ let json = i.getNBT().toObject()
+ socketConnection.requestItemPrice(json, uuid)
+ }
+ }
- let json = i.getNBT().toObject()
- socketConnection.requestItemPrice(json, uuid)
}
if (this.showChampion.getValue() && i?.getNBT()?.getCompoundTag("tag")?.getCompoundTag("ExtraAttributes")?.getDouble("champion_combat_xp")) {