How can I detect if the weather has changed?

Discussion in 'Plugin Development' started by Bobokins, Nov 5, 2014.

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

    Bobokins

    Hi. I'm just trying out stuff since i'm new to bukkit coding. I want to detect when weather is changing and have it log this in the console. I know how to log it in the console but, how do I detect when its raining? I saw the WeatherChangeEvent in the bukkit API and it sounds like this would work, but its a class. I need a boolean. So I could do
    Code:java
    1. if(WeatherChangeEvent == true){
    2. this.log.info(msg)

    and "msg" would be a string that would say "Weather Changed".
    Anyone know if there is a boolean that could do this? Or if there isn't a boolean, how do I do it?
     
  2. Offline

    Barinade

  3. Offline

    Funergy

    Barinade Bobokins LOL XDDDDDD LMAOOOOOOOOO.
    Check that page Barinade provided you to learn how to use Events,etc etc
     
  4. Offline

    Bobokins

    Ok...the only prob is that's not the version of Eclipse I have
     
  5. Offline

    Barinade

    Irrelevant
     
  6. Offline

    TheCodingCat

    just listen for WeatherChangeEvent
    if you are unfamiliar with listeners and bukkit events this might help you
     
Thread Status:
Not open for further replies.

Share This Page