Solved How to change weather by java code ?

Discussion in 'Spigot Plugin Development' started by Interestinng, May 12, 2016.

  1. I know
    Code (Text):
    plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), "weather rain");
    can change the weather,
    but it will show feedback in client like this:
    upload_2016-5-12_20-6-4.png

    Is there some ways to hide feedback ?
    Or other ways to change weather what I want ?
     
  2. You can do World#setRaining to change the weather.
     
  3. I can't find setRaining, but there's setThundering
     
  4. That's it. I didn't have the javadocs on hand so I wasn't sure.
     
  5. i saw all, but not i want..
    if I want to schedule the weather all the year include sunny, rain or thunder, setThundering can't do these..
    Any way. Thanks guys.
     
  6. You would have to write your own code to accomplish this. Minecraft has a very simple system for weather.
     
  7. i know. but it will show feedback to client as my image in main post.
     
  8. i found setStorm. resolved.