[SOLVED] Tripwire Event on single tripwire

Discussion in 'Spigot Plugin Development' started by Yannici, May 18, 2015.

  1. Hello Guys,

    I got a question about tripwire events.
    There is a event when tripwire gets triggered. But is the same event there when only one single tripwire is placed on the floor? Or is this event only triggering when the tripwire is in combination with a tripwire hook? I can't test it by myself, because I'm at work at the moment :D But I want to know if I need a PlayerMoveEvent to check if the player is walking on a tripwire or if I get the PlayerInteractEvent ...

    Thanks in advance
    Yannici
     
  2. You said there is an event but I can't seem to find it. The best way to do it without the event is on PlayerMoveEvent get the p.getLocation().getBlock() since it gets the block at the player's feet. So it is whatever they are stepping on. (The tripwire)
     
  3. The event is the "PlayerInteractEvent" with Action "PHYSICAL" ...
     
  4. Never mind, I'll test it by myself in the next hour.
     
  5. The PlayerInteractEvent only fires when it is linked with tripwire hooks. When you here the click in-game from walking on it, the event is fired with Action.PHYSICAL. Be careful as pressure plates also trigger this.
     
  6. Ok, thanks.