aboutsummaryrefslogtreecommitdiff
path: root/commands/coords/temple.js
diff options
context:
space:
mode:
authorNinjune <enderknight537@gmail.com>2023-01-14 18:51:28 -0600
committerNinjune <enderknight537@gmail.com>2023-01-14 18:51:28 -0600
commit8fa7fe39d9edbdd8b00ec238c4e40b6ecd0808cc (patch)
tree04000ede45a86ebfb76b5b01ad4a169be8234470 /commands/coords/temple.js
parent329dccf50ed5e9f87531580f679522238b6a019b (diff)
downloadcoleweight-main.tar.gz
coleweight-main.tar.bz2
coleweight-main.zip
v1.8.7HEADmain
Diffstat (limited to 'commands/coords/temple.js')
-rw-r--r--commands/coords/temple.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/commands/coords/temple.js b/commands/coords/temple.js
new file mode 100644
index 0000000..f60e724
--- /dev/null
+++ b/commands/coords/temple.js
@@ -0,0 +1,46 @@
+import constants from "../../util/constants"
+import { waypointRender } from "../../util/helperFunctions"
+
+const PREFIX = constants.PREFIX
+let waypoints = []
+
+export function temple(arg)
+{
+ const WAYPOINTNAME = "Temple"
+
+ if(arg != "toggle")
+ {
+ new TextComponent(`${PREFIX}&bStand on the leftmost key guardian and do /cw ${WAYPOINTNAME} toggle`)
+ .chat()
+ }
+ else
+ {
+ if(waypoints[0] == undefined)
+ {
+ let startPos = [Player.getX(), Player.getY(), Player.getZ()],
+ x = startPos[0],
+ y = startPos[1],
+ z = startPos[2]
+
+ waypoints.push([x + 61, y + -44, z + 18])
+
+ ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned on!`)
+ }
+ else
+ {
+ waypoints = []
+ ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned off!`)
+ }
+ }
+}
+
+register("renderWorld", () => {
+ waypointRender(waypoints)
+})
+
+
+register("worldLoad", () => {
+ waypoints = []
+})
+
+export default "" \ No newline at end of file