Get Player

Discussion in 'Plugin Development' started by MC_Player, Dec 10, 2011.

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


    How can I get the player in a BlockRedstoneEvent, I tried this,
    Player player = e.getPlayer();
    But that does not work.. :s
  2. Offline


    you can't that easy
  3. Offline


    @MC_Player there is no Player part to BlockRedstoneEvent, as that only handles when a current has changed state to a block.

    I'm assuming you want something to happen if a redstone torch or some wire is placed?
    If this is the case, you'd have to check for a BlockPlaceEvent or BlockDestroyEvent, and see if the block involved has something to do with redstone.
  4. Offline


  5. Offline


    maybe check the location of the block and forLoop all players location and see whose the nearest on that block?
  6. Offline


    Tell me what you want the plug-in to do and then post the code, we might be able to do a work around on the issue.
  7. Offline


    I want to get who turned the redstone on, sorry i cannot reach any code now.
  8. Offline


    Doesn't exist a such class/method in the bukkit.jar, sorry.
  9. Offline


    Try to use the "onPlayerInteract" Event and see if someone uses a lever or button.
Thread Status:
Not open for further replies.

Share This Page