From 6c5718a0d213ebf0e1a727e369e1d310bfb8ff9a Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Mon, 22 Aug 2022 00:27:09 +0800 Subject: prevent duplicated lines in miniboss hud --- features/slayers/index.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'features') diff --git a/features/slayers/index.js b/features/slayers/index.js index 288d599..d090e9b 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -801,10 +801,13 @@ class Slayers extends Feature { if (this.MinibossGuiElement.getValue() && !this.bossSpawnedMessage && this.minibossEntity.length > 0) { let PY = Player.getY() let tempArray = [] + let tempEntity = [] this.minibossEntity.forEach((x) => {//this.SlayerHeight[slayerType] values are negative + if (tempEntity.includes(x)) return if (Math.abs((x[0].getY() + this.SlayerHeight[x[1]] - PY)) > 6) return let name = x[0].getName() if (name.split(" ")[2] === "§e0§c❤") return + tempEntity.push(x) tempArray.push(name) }) this.MinibossElement.setText(tempArray.join("\n")) -- cgit