Is there any way or event that tells you when a pathfinding goal has been reached?
L leonrobi New member Jan 20, 2024 2 0 1 Jan 20, 2024 #1 Is there any way or event that tells you when a pathfinding goal has been reached?
L leonrobi New member Jan 20, 2024 2 0 1 Jan 22, 2024 #2 Solved using NMS but this can be done without NMS Code: private var movingLock = false override fun tick() { super.tick() if (this.deltaMovement.x == 0.0 && this.deltaMovement.z == 0.0) { if (movingLock) { Bukkit.broadcastMessage("Stopped moving.") movingLock = false } } else { movingLock = true } }
Solved using NMS but this can be done without NMS Code: private var movingLock = false override fun tick() { super.tick() if (this.deltaMovement.x == 0.0 && this.deltaMovement.z == 0.0) { if (movingLock) { Bukkit.broadcastMessage("Stopped moving.") movingLock = false } } else { movingLock = true } }