diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-19 21:50:46 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-19 21:50:46 +0800 |
commit | 997309106c26f1e11d31592b64fa493fba7b64ba (patch) | |
tree | a18730112bbfc2bf4fe816b06a6f40eb20eb11b3 /features/globalSettings | |
parent | 55776850ead3263aa8ea7f12fd26cf373c0b5c06 (diff) | |
download | SoopyV2-997309106c26f1e11d31592b64fa493fba7b64ba.tar.gz SoopyV2-997309106c26f1e11d31592b64fa493fba7b64ba.tar.bz2 SoopyV2-997309106c26f1e11d31592b64fa493fba7b64ba.zip |
+ fix buggyness with pickup log in sell guis
Diffstat (limited to 'features/globalSettings')
-rw-r--r-- | features/globalSettings/index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 429cb23..e5dd47b 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -308,7 +308,7 @@ class GlobalSettings extends Feature { max = Number(max) if (max < 0 || isNaN(max)) this.maxAmount.setValue("0"); } - let inGui = Client.isInGui(); + let inGui = Client.isInGui() if (!old && !pick && !thunder) return if (inGui) { this.todoPickUpLog = {}; @@ -342,9 +342,9 @@ class GlobalSettings extends Feature { if (!oldItem && !newItem) return //they both are air if (j > 36 || j == 9) return //sbmenu and armors (when switching wardrobe it goes brrr w/o this) let oldItemAmount = oldItem ? oldItem.getNBT().getDouble("Count") : undefined - let oldItemName = oldItem ? oldItem.getName() : "" + let oldItemName = oldItem ? oldItem.getName().replace(/ §8x\d+$/, "") : "" let newItemAmount = newItem ? newItem.getNBT().getDouble("Count") : undefined - let newItemName = newItem ? newItem.getName() : "" + let newItemName = newItem ? newItem.getName().replace(/ §8x\d+$/, "") : "" this.oldItemData[j] = newItem if (oldItemName === newItemName) { //only amount is changed if (oldItemAmount === newItemAmount || !newItemAmount || !oldItemAmount) return @@ -431,7 +431,7 @@ class GlobalSettings extends Feature { updateItemLores() { if (!this.itemWorth.getValue() && !this.showChampion.getValue() && !this.showHecatomb.getValue()) return; - if (!Client.currentGui.get()) return + if (Client.isInGui()) return let items = [...Player.getInventory().getItems(), ...Player.getContainer().getItems()] |