aboutsummaryrefslogtreecommitdiff
path: root/features/globalSettings
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-08-19 21:50:46 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-08-19 21:50:46 +0800
commit997309106c26f1e11d31592b64fa493fba7b64ba (patch)
treea18730112bbfc2bf4fe816b06a6f40eb20eb11b3 /features/globalSettings
parent55776850ead3263aa8ea7f12fd26cf373c0b5c06 (diff)
downloadSoopyV2-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.js8
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()]