From 378545ab6d2aab0cc88f6ddfb3252bc942bec1b8 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Wed, 6 Jul 2022 09:15:37 +0800 Subject: + crap tone of dungeonRoutes progress + added /snoopy and /snoopyv2 commands for pepegas + fix small bug with CH waypoints --- features/waypoints/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'features/waypoints') diff --git a/features/waypoints/index.js b/features/waypoints/index.js index f9eb039..8d20a64 100644 --- a/features/waypoints/index.js +++ b/features/waypoints/index.js @@ -44,6 +44,12 @@ class Waypoints extends Feature { this.userWaypointsArr = Object.values(this.userWaypoints) this.updateWaypointsHashes() this.waypointsChanged = false + this.lastTp = 0 + this.registerEvent("messageSent", (m) => { + if (m.toLowerCase().startsWith("/warp")) { + this.lastTp = Date.now() + } + }) this.patcherWaypoints = [] @@ -176,7 +182,7 @@ class Waypoints extends Feature { minewaypoints_socket.setServer(server, World.getWorld().func_82737_E()) - if (Date.now() - this.lastSend > 1000) { + if (Date.now() - this.lastSend > 1000 && Date.now() - this.lastTp > 5000) { Scoreboard.getLines().forEach(line => { line = ChatLib.removeFormatting(line.getName()).replace(/[^0-9A-z]/g, "") if (Object.keys(areas).includes(line)) { -- cgit