Time Change Event

Discussion in 'Bukkit Help' started by theone15247, Apr 10, 2012.

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

    theone15247

    In my plugin I need to broadcast a message when it becomes night, is there a way to do this?

    Thanks
     
  2. Offline

    Dreeass

    I can't seem to find an event for it but try doing it for an if statement?
    Ofcourse it depends on what you use it for..
    if(getServer().getWorld(WORLDNAME)getTime()) > TIMENIGHT) {
    Do blablabal...
    }
     
  3. Offline

    theone15247

    in what event would I put this in? PlayerMoveEvent?
     
  4. Offline

    Dreeass

    In a loop or something because it constantly needs to check for it... but it'll take a lot more processes I think.. It's not advised, but I really don't know where to put it..
     
  5. Offline

    Darq

  6. Offline

    Dreeass

    I found this out yesterday, should've posted it here too.
     
  7. Offline

    andrewpo

    Can you put the code into a listener for time changes?
     
  8. Offline

    Dreeass

    The code can be anywhere you want.
    Edit: But ofcourse you must point to the method where it's in.
     
  9. Offline

    andrewpo

    Sorry, PHP is my area of expertise. :p
     
Thread Status:
Not open for further replies.

Share This Page