Looking for an event

Discussion in 'Plugin Help/Development/Requests' started by westjet, Jun 1, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    westjet

    I'm looking for an appropriate event to listen to that involves players LEFT-CLICKING a FallingBlock Entity.

    Theirs tonnes of events, but I can't find or don't know if there is one that matches what I'm looking for.
     
  2. Offline

    BizarrePlatinum

    @westjet I believe you should be able to do this with PlayerInteractEntityEvent, test if the action is left click, and then I think there should be a way to test if they hit a FallingBlock.
     
  3. Offline

    westjet

    I think that event (PlayerInteractEntityEvent) is only for right-clicks...
     
  4. Offline

    BizarrePlatinum

    @westjet that one is, meant PlayerInteractEvent.
     
  5. Offline

    westjet

    Tried already, does not fire when clicking at a FallingBlock.
    I did a logger test on it, logging the toString() version of .getAction(). It did not log anything when clicking left/right at a fallingblock. Any more events you can think of?
     
  6. Offline

    I Al Istannen

    @westjet EntityDamageByEntityEvent? I haven't tested it, but it fires also by invisible, undestroyable armorstands. So there is the chance it will work.
     
  7. Offline

    westjet

    Just tested. Doesn't fire.

    Any chance of creating my own event? Or maybe I can put the FallingBlock on the armor stand as the feet part.
     
  8. @westjet What version of CraftBukkit are you using?
     
  9. Offline

    westjet

    1.8.3
     
  10. Offline

    miniminer79

    According to: https://hub.spigotmc.org/javadocs/bukkit/

    Class PlayerInteractEvent

    Called when a player interacts with an object or air.

    This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air)

    EDIT: Take a look at all of the Player events on the website above. Choose one that fits the proper description.
     
Thread Status:
Not open for further replies.

Share This Page