Event API

Discussion in 'Archived: Plugin Requests' started by RingOfStorms, Oct 6, 2012.

  1. Offline

    RingOfStorms

    Plugin Category: Developer API

    Suggested Name: EventAdditions

    What I Want: Hey guys I am looking for someone to make an API that has two new events, PlayerLoadEntityEvent, as well as PlayerUnloadEntityEvent. I've been trying to figure a reasonable way to do this and can't get it right. So just something myself and others can use to detect when a new entity appears for a player, and possible dis-appears.

    When I'd Like it by: Now
     
  2. Offline

    Hoolean

    So when a packet is sent to the player? :confused: I'm confused and lacking sleep :D
     
  3. Offline

    RingOfStorms

    I'm trying to find a good way to detect when an entity comes into view for a player.
     
  4. Offline

    Hoolean

    Ah! I see. ;D

    I can think of a way to do it I think :/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  5. Offline

    RingOfStorms

    Yea, I think I am going to just have to use a repeating task and just update the entities every second or so.
     
  6. Offline

    SirTyler

    Look at how we handle checking if you can see the player in Guns+ (I believe its in our Utils class, its in that package I know that much). Other than that if you are going to do a plugin for just those two events than its not worth it, see if you can get a PR going otherwise I may add it to my Api+ plugin. The only problem with this event (rather then just code checking if they can see) is that the event would have to be fired every time any player sees and entity, that would be a lot of events.
     

Share This Page