From f0d90a13232fb05b43083d7c3ff10a58e48c1f7b Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:47:04 +0800 Subject: old master stars --- features/globalSettings/index.js | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 1c1381a..7a56e6c 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -49,6 +49,34 @@ class GlobalSettings extends Feature { this.hideFallingBlocks = new ToggleSetting("Hide falling blocks", "NOTE: This setting is a bit laggy", false, "hide_falling_sand", this) this.twitchCommands = new ToggleSetting("Ingame twitch bot commands", "Allows u to use twitch bot commands ingame (eg -sa)", true, "twitch_commands_ingame", this) this.itemWorth = new ToggleSetting("(Approximate) Item worth in lore", "Accounts for stuff like enchants/recombs ect", false, "item_worth", this) + this.oldMasterStars = new ToggleSetting("Use Old Master Stars", "replaces the ugly new master star on item name with the old fashion one", false, "old_master_star", this) + + this.registerEvent('itemTooltip', (lore, i, e) => { + if (!this.oldMasterStars.getValue()) return + if (!i) return + let itemName = i.getName() + let itemNameReformat = itemName.removeFormatting() + if (itemNameReformat.endsWith("➊")) { + i.setName(itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➊", "&c✪&6✪✪✪✪")) + return + } + if (itemNameReformat.endsWith("➋")) { + i.setName(itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➋", "&c✪✪&6✪✪✪")) + return + } + if (itemNameReformat.endsWith("➌")) { + i.setName(itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➌", "&c✪✪✪&6✪✪")) + return + } + if (itemNameReformat.endsWith("➍")) { + i.setName(itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➍", "&c✪✪✪✪&6✪")) + return + } + if (itemNameReformat.endsWith("➎")) { + i.setName(itemName.replace("§6✪§6✪§6✪§6✪§6✪§c➎", "&c✪✪✪✪✪")) + return + } + }) this.firstPageSettings = [this.darkTheme] @@ -602,4 +630,4 @@ class FirstLoadingPage extends GuiPage { module.exports = { class: new GlobalSettings() -} \ No newline at end of file +} -- cgit