From c92d9973c23b01eae02904a3e79f382cbdaaa35d Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Thu, 19 May 2022 17:00:27 +0800 Subject: small formatting changtes --- features/waypoints/index.js | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'features/waypoints') diff --git a/features/waypoints/index.js b/features/waypoints/index.js index 77e16f5..e378898 100644 --- a/features/waypoints/index.js +++ b/features/waypoints/index.js @@ -65,9 +65,7 @@ class Waypoints extends Feature { this.userWaypointsArr = Object.values(this.userWaypoints) this.waypointsChanged = true this.updateWaypointsHashes() - if (this.showInfoInChat.getValue()) { - ChatLib.chat(this.FeatureManager.messagePrefix + "Added waypoint " + name + "!") - } + if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Added waypoint " + name + "!") }) this.registerCommand("delwaypoint", (name) => { @@ -75,18 +73,14 @@ class Waypoints extends Feature { this.userWaypointsArr = Object.values(this.userWaypoints) this.waypointsChanged = true this.updateWaypointsHashes() - if (this.showInfoInChat.getValue()) { - ChatLib.chat(this.FeatureManager.messagePrefix + "Deleted waypoint " + name + "!") - } + if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Deleted waypoint " + name + "!") }) this.registerCommand("clearwaypoints", () => { this.userWaypoints = {} this.userWaypointsArr = [] this.waypointsChanged = true this.updateWaypointsHashes() - if (this.showInfoInChat.getValue()) { - ChatLib.chat(this.FeatureManager.messagePrefix + "Cleared waypoints!") - } + if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Cleared waypoints!") }) this.registerCommand("savewaypoints", () => { Java.type("net.minecraft.client.gui.GuiScreen")[m.setClipboardString](JSON.stringify(this.userWaypoints)) @@ -99,13 +93,9 @@ class Waypoints extends Feature { this.userWaypointsArr = Object.values(this.userWaypoints) this.waypointsChanged = true this.updateWaypointsHashes() - if (this.showInfoInChat.getValue()) { - ChatLib.chat(this.FeatureManager.messagePrefix + "Loaded waypoints from clipboard!") - } + if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Loaded waypoints from clipboard!") } catch (e) { - if (this.showInfoInChat.getValue()) { - ChatLib.chat(this.FeatureManager.messagePrefix + "Error loading from clipboard!") - } + if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Error loading from clipboard!") } }) -- cgit