diff options
author | EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> | 2022-08-11 03:08:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 03:08:41 +0800 |
commit | f7185ba108df10f3d102a5be1294649daeaff6c6 (patch) | |
tree | 567b5457888dcdbc319a278cc1ecdd2d3f4e44fc /features/globalSettings | |
parent | 29bc7f9f65f196b4e1703d86692d0debc0791fc7 (diff) | |
download | SoopyV2-f7185ba108df10f3d102a5be1294649daeaff6c6.tar.gz SoopyV2-f7185ba108df10f3d102a5be1294649daeaff6c6.tar.bz2 SoopyV2-f7185ba108df10f3d102a5be1294649daeaff6c6.zip |
+worldLoad for pickup log
only doing 1-8 hot bar slots
Diffstat (limited to 'features/globalSettings')
-rw-r--r-- | features/globalSettings/index.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 185c5c1..eaa296d 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -103,6 +103,48 @@ class GlobalSettings extends Feature { } }) + this.registerEvent('worldLoad', () => { + if (!this.oldMasterStars.getValue()) return + let j = 0; + [...Player.getInventory().getItems()].forEach(i => { + j++; + if (j > 8) return //only do the 1-8 hot bar slots + if (!i) return + let itemName = i.getName() + let itemNameReformat = itemName.removeFormatting() + if (itemNameReformat.endsWith("➊")) { + let newItemName = itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➊", "§c✪§6✪✪✪✪") + i.setName(newItemName) + this.saveItemData(getSBUUID(i), newItemName) + return + } + if (itemNameReformat.endsWith("➋")) { + let newItemName = itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➋", "§c✪✪§6✪✪✪") + i.setName(newItemName) + this.saveItemData(getSBUUID(i), newItemName) + return + } + if (itemNameReformat.endsWith("➌")) { + let newItemName = itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➌", "§c✪✪✪§6✪✪") + i.setName(newItemName) + this.saveItemData(getSBUUID(i), newItemName) + return + } + if (itemNameReformat.endsWith("➍")) { + let newItemName = itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➍", "§c✪✪✪✪§6✪") + i.setName(newItemName) + this.saveItemData(getSBUUID(i), newItemName) + return + } + if (itemNameReformat.endsWith("➎")) { + let newItemName = itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➎", "§c✪✪✪✪✪") + i.setName(newItemName) + this.saveItemData(getSBUUID(i), newItemName) + return + } + }) + }) + this.itemData = {}; this.oldItemData = {}; this.initOldItemData(); |