Leash animal API ?

A new update (0.9.2) is available now!
Latest Hotfix: 0.9.2.1 (2026-05-12)
  • Hi!


    I try to control, via API, when animals can be leashed with a rope. I looked in API but not yet any clue how to detect when a player leash a animal and eventually deny this if some conditions are meet. If any have any hint, that will be very appreciated!


    Thx.


    Bamse

  • I make some progress but i don't know how to cancel PlayerMouseButtonEvent (it seems this event don't have setCanceled(true) method ...


    But i even if find a method to cancel mouse press button i don't think this is the best approach because left button is used very heavy in game ..


    Idealy i want some Event who is triggered on start of special action of equipped item like "Catch Animal", "Shear sheep", etc ...


Participate now!

Don’t have an account yet? Create a new account now and be part of our community!