Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7316

Cancelling EntityUnmountEvent does not stop the all effects of the unmounting


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • CraftBukkit version 3635-Spigot-d90018e-941d7e9 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
    • Yes

      Cancelling the EntityUnmountEvent does not stop all of the effects of unmounting. This can most obviously be seen in this snippet of code from EntityHuman:

       The EntityUnmountEvent gets cancelled inside of the call to this.stopRiding(). However, even though the entity doesn't get unmounted, their shiftKeyDown value gets set to false. Additionally, the entity won't tick for that tick because the tick call (this.rideTick()) is in the else statement. This means if you are forcing a player to stay on a horse, that player can hold the shift key, and their position won't update on the server. This means mobs won't target the player correctly, new chunks won't load/deload around the player, etc.


            Unassigned Unassigned
            Lux Gareth Fultz
            0 Vote for this issue
            1 Start watching this issue