Something to use instead of onPlayerMove.

Discussion in 'Plugin Development' started by Drakonix, Nov 29, 2011.

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

    Drakonix

    Hey!

    I'm creating a small plugin that damages player when they are in sunlight. So I want to check if player is outside but I don't want to use onPlayerMove. Any solutions ?

    Thanks for help.
     
  2. Offline

    bleachisback

    Why don't you want to use onPlayerMove?
     
  3. Offline

    Drakonix

    Checking every player move event is realy ... bad? I want my plugin as lightweight as possible.. If there won't be any solution ofcourse I will use onPlayerMove.
     
  4. Offline

    bleachisback

    Nope. No solution.
     
  5. Offline

    nisovin

    Just make a repeating task with the scheduler.
    Really? No solution?
     
    Drakonix likes this.
  6. Offline

    bleachisback

    I thought about that, but doesn't onPlayerMove only get called at max every tick? So the scheduler is called every tick no matter what, and onPlayerMove is only called sometimes every tick
     
  7. Offline

    Afforess

    On player move can be called dozens of times per player per tick.
     
    Drakonix likes this.
  8. Offline

    nisovin

    You can define your task to be called as often as you want, it doesn't have to be every tick.
     
    Drakonix likes this.
  9. Offline

    Drakonix

    That may be a good solution! Thanks! :)
     
  10. Offline

    user_43347

    Its not a good solution, its the best solution :p
     
Thread Status:
Not open for further replies.

Share This Page