Solved Finding out when a pathfinding goal is reached

  • After careful consideration and due to limited usage, we’ve made the decision to discontinue the PaperMC forums. Moving forward, we recommend using Hangar for plugin uploads, and for all other community discussions and support, please join us on Discord.

leonrobi

New member
Jan 20, 2024
2
0
1
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
        }
    }