Animal kiting

Discussion in 'Plugin Development' started by damo1995, Jul 11, 2013.

Thread Status:
Not open for further replies.
  1. Hi there,

    For my current plugin i am looking at a way of stopping kiting using wheat. Players in the server cannot harm animals in regions but i cannot seem to find the correct event for it :/ i some how seem to think it may be entitiytargetlivingentityevent but im not sure could somebody please confirm this.

    Thanks.
     
  2. Offline

    timtower Administrator Administrator Moderator

    Next time, please use an non-WOW term next time, and this should be in plugin development
     
  3. My bad dident know it was a WoW term? heard multiple people use it on my server and yes this should be plugin development not requests misread the forum subcatagory :)
     
  4. Offline

    TnT

    Moved to the correct forum.
     
  5. Offline

    timtower Administrator Administrator Moderator

    Somebody moved it already ;) And I assumed it was an WoW term because that was the first page that came up when I searched for it :p
    Lol, ninja'd by TnT
     
  6. Offline

    xTrollxDudex

  7. Offline

    timtower Administrator Administrator Moderator

    Get wheat in your hand, let the mob follow you
     
    xTrollxDudex likes this.
  8. In an MMORPG, you can grab a mob's attention and keep walking away from it which pulls it along
    /*Definition from Urban Dictionary *\

    And yes you are right it first appeared in WoW guess my players must be WoW noobs hehe :3 Im only joking ofc. Can somebody please confirm that i am looking at the correct even and if not guide me in the right direction ?

    Thanks.
     
  9. Offline

    xTrollxDudex

  10. Offline

    timtower Administrator Administrator Moderator

    You could test it yourself, at every entitiytargetlivingentityevent create an debug message containing the target and the targeting entity, if you don't get an message when you attract an pig then you have the wrong event
     
  11. I've tried both EntityTargetLivingEntityEvent and EntityTargetEvent both fail and return nothing :/ Anybody got any ideas?

    Thanks
     
  12. Offline

    metalhedd


    it doesn't fire any sort of target event at present. this is problematic for me as well. I think there's a pull request to address this but it hasn't found its way into the code yet.
     
  13. Offline

    Garris0n

  14. Hmm, that is a bit problematic isen't it. Have too wait and see if the pull request gets answered i guess.

    Thanks for the help.
     
  15. Offline

    metalhedd


    Garrison's suggestion is the best way to go for now, that's what I ended up doing as well, and IIRC, thats where the pull request added a EntityTargetEntityEvent, but I can't seem to find it now. I'll take another look through github this afternoon.
     
  16. Problem with that is i would have to change multiple classes because i use a list of entities from a list to protect them (dev.bukkit.org/server-mods/animalprotect) So that would be dificult to do. Thanks for the idea though but i think i will just wait for this feature and make people fence their animal in.
     
Thread Status:
Not open for further replies.

Share This Page