[MISC] WeatherSync v2.0_1 - The real-world weather - Now with multiworld and more! [1337-1597]

Discussion in 'Inactive/Unsupported Plugins' started by cppchriscpp, Apr 22, 2011.

  1. Offline


    Moving to BukkitDev! Click here!

    WeatherSync - The real-world weather in Minecraft
    Version: 2.0_1

    Important note for those upgrading from 1.2: Your old configuration files will not work as-is. You'll need to copy over the new config file, and move over any old settings that still apply.

    This plugin keeps the weather in the worlds on your server synchronized with the real-world weather in a location you specify. It does this by connecting to weather underground every few minutes (configurable; 5 minutes by default) and parsing the weather. This means if it's raining outside, it will be raining in minecraft. This is also true of thunderstorms.

    You will want to configure it before you try to use it; otherwise it will synchronize your default world (named "world") with the weather in San Francisco, California. (Used for testing.)

    This should work for any place you can get an RSS feed with weather in it from WeatherUnderground. See the directions below for how to find this, and if it does not work, feel free to ask for help. Please be sure to provide the URL you are using!

    RSS feeds are now the only way to synchronize with this plugin. Old location information will be ignored by the plugin as of version 1.3.

    You can now view the forecast with the /forecast command, which is available to all users. It will also show the current weather. This command can be disabled, if desired.

    As a warning, I have not been able to test this to the level I test most things due to the nature of it. Please let me know if/when you have issues.

    Download (Source code is in there too!)

    Future Features:
    • Heavy/severe thunderstorms? (Sorry guys, there's no chance I'm going to have time for this. Maybe another plugin can hook into thunderstorms and make this happen, if it doesn't already exist.)
    • unit selection (determined by rss feed; see the ?units=metric/english at the end? change that)
    • None; I implemented everything else here! :)
    Time synchronization:

    Some people in this thread expressed interest in having the real world time on their servers alongside this. I was going to code this myself, however there is something out there already that can do this. Check out RealTime by Mechestrial for this!


    How to find your RSS feed (open)
    This plugin now asks you to provide the URL to an RSS feed to get the weather. The old method will not work past version 1.2. The method to get the URL to your RSS feed is as follows:

    Navigate to http://wunderground.com, and find your location.

    Around the height of the title of the page on the far right is an RSS icon. You need to get the URL of this -- right click it and copy the link address. It should look like:
    Take this entire thing, and put it in the worlds section of your config file.

    If you have problems finding this, just ask. My explanation here is not that good.


    Due to how this thread has been going, I am going to require all reports to include this information, or your bug report may be ignored.
    • An extremely detailed description of the problem.
    • That you have turned debug mode on in the config file, and then caused the problem to happen-- this will provide me with helpful insights into what is going wrong.
    • Your configuration file
    • The major error that occurred
    • The rest of the server.log surrounding that error. If you aren't sure, just give me the whole thing.
    • Any errors a client might have seen
    • Anything you think might have gone wrong -- your insights often lead me to the problem quickly; even if you are wrong.
    • Your build of craftbukkit
    • Any changes in your setup that preceeded the problems (installed plugins, mainly)
    • Your system information (Some of this is in /debug info)
      • (Ideally, just include all output from these two commands.)
      • Operating system
      • Java version
      • Any wrapper software you might be using
      • A list of plugins you use (As reported by /plugins or "plugins" at the server command line)
    • Any other details that could be relevant.
    Yeah, I know it's a lot and it's kind of a pain in the rear. Some of it won't be useful in some situations, but I only get a very little time to work on this now, and I really don't like having to put that time to waste just because I don't have all the information I could about what went wrong.


    Version 2.0_1
    • Fixed a dumb mistake causing some users to get the forecast for the last day available instead of the first.
    Version 2.0
    • Multiworld support!!!!111 (Sorry; had to do it.)
    • Re-enabled messages to users on the weather changing
    • Redid the configuration file for multiworld and some other stuff
    • Customization options for messages; you can now set what the plugin sends to users!
    Version 1.3
    • Never existed; I jumped straight to 2.0. Not sure what I was on when I put this version here. >_>
    Version 1.2
    • Fixed (hopefully) the bug with weather not updating once and for all. The weather will be FORCIBLY updated every time the weather is checked.
      • Note that client desynchronization issues may still occur. If you disconnect and reconnect and the weather is correct again, there is nothing I can do to fix this, sorry.
    • Changed the default method of specifying location to an RSS feed. Let's see how this can break things D:
    • Accidentally removed the show-forecast option which shows when the weather changes in chat. Did anyone actually use this? Redoing it for multiworld is going to be a massive pain if people want it.
    • Fixed broken forecasts
    Version 1.1_3
    • Fixed debug mode -- anyone who had problems please try again and report your issues again. Sorry for the inconvenience; it was my fault.
    Version 1.1_2

    • Fixed the weather randomly changing bug. Really this time! (I think)
    Version 1.1_1

    • Program now accepts blank configuration options correctly
      • (This fixes the null pointer issues.)
    Version 1.1

    • Weather forecasting (w/ forecast command)
    • Ability to show forecast on join
    • Debug mode that will display what the weather is on start and when it changes (new config option -- use this to report bugs!)
    • More failure-checking in the forecast changes.
    • Support for weather stations
    • Fixed threading/recursion..
    • Clarified config files.
    • Fixed various bugs
      • Weather duration not being set (cause of random weather at times)
      • Improper string conversion (That boolean bug that someone had on page 4)
      • (More that have been forgotten since being fixed..)
    Version 1.0

    • Initial release
    JonasD, zhuowei, Stoepsel and 5 others like this.
  2. Offline


    this sounds fucking awesome! must have been a pain to test lol just waiting for it to rain out side haha
  3. Offline


    Impossible, nearly. I ended up having to ask people what the weather was like near them then grabbing their area code if it was what I needed to test. It was kinda nuts. (And is also why it took so long to get this fully working. Too many situations that I just could not recreate in any reasonable amount of time.)
  4. Offline


  5. Offline


    Seems like Plugin does not work for multiple worlds. I have write the following lines into the config file:

    # WeatherSync configuration file
    # How frequently to update the weather, in minutes.
    updatetime: 1
    # Which world to update the weather on, in multiworld setups.
    world: PortalWorld
    world: Abbauwelt
    # RSS File to get the weather from.
    # To get this, get your weather on http://wunderground.com, and
    # find the rss link for your location. It should be towards the top on
    # the right.
    # Note: The old format should still work, but is unsupported.
    rssfile: http://rss.wunderground.com/auto/rss_full/global/stations/10734.xml?units=metric
    # Whether to show the weather/forecast to users on join.
    # (Formatting of this may be possible in the future; request it if
    # you're interested!)
    forecast-on-join: true
    # Whether to show the forecast when weather changes.
    show-forecast: true
    # Whether to have debug mode on.
    # You'll want this off for most servers, but turn it on if you have problems and
    # it will give you extra information about what is going wrong.
    # Please turn this on if you have issues, and report any unusual output.
    debug: true
    The plugin changes the weather only in the last world ( in this case "Abbauwelt").
  6. Offline


    Hence multiple worlds being in the todo list. Also, if multiple worlds are supported in the future, that syntax will be wrong due to the way yaml works. Not important for now, though.
  7. Offline


    Outside it begins to raining and all my players are wondering why its raining ingame too :D
  8. Offline


    This is great, thanks for the awesome plugin!
  9. Offline

    Atomic Fusion

    +1 for multiworld support.
    Could you add an option/permission node to disable the /forecast command?

    Thanks for the nice plugin!
  10. Offline


  11. Offline


    So, after seeing some new activity on this plugin recently, I decided it was about time for a nice big update. I finally found some time this weekend, and the result is available in the first post. So, what was added?

    First of all, the big one is multiworld support. You can now sync the weather in as many worlds as you would like! This required a bit of a rewrite of the config files, though. I could have written something to parse the old files into the new format, but I am running out of steam tonight. In addition, I want people to look at all the new options in the config file, so that they can use them.

    The next big one is some configuration on what the server sends clients. You can now configure the text sent with the forecast, and the weather. You can rename the types of weather too, if you so choose. You could also change the color of the types while keeping the original text, if you so choose. It's up to you. I know a couple of you had asked for this; I hope I got what you were looking for down.

    The others are more minor things that have been sitting on the waiting list. Someone requested the ability to turn off the forecast command. That's a pretty simple one, and it's here with this release.

    Finally, I re-enabled showing the weather to users when it changes. This has its own (poorly-named) configuration option.

    There may be a few bug fixes that got in too, but I have already forgotten about doing them, if so.


    Please excuse any atrocious grammar mistakes I may have made during this post or in the first one. I am starting to feel really out of it right now, but I wanted this thing released before I went to bed.
  12. Offline


  13. Offline


    Looks right.. did you give it a couple seconds before connecting/checking weather? It takes about 5-10 seconds for the initial weather to synchronize; after that try /forecast again (or reconnect if you disabled that function.) This will only show up for the first few seconds after the server is started.

    If not, I can see about looking at it after work today.
  14. Offline


  15. Offline


    Well, the plugin itself is working fine from what I can tell, and getting the current weather just fine, but it's giving you the last day on their forecast, rather than the current day. Bizarre; as I said, I'll look at it tonight if I can make time.

    Update: Well, clearly I didn't manage to find time. Tonight I can almost promise no time will free up. Tomorrow may work, though. I'm trying.
  16. Offline


    Well, that was the quickest fix I've ever pushed out. It took me under 5 minutes to isolate and solve the problem. I forgot a break statement in the while loop used to get the forecast... so it got the first forecast, then got the second forecast ... got the last forecast and saved that, rather than using the first.

    Redownload for a fix. That didn't affect all locations; only a select few that used a certain format.

  17. Offline


    Awesome mod!!! The only bad part, rain causes tremendous lag....:( But other than that great job!!!
  18. Offline


    Well, that has nothing to do with this.. just general MC. Glad you like it though.
  19. Offline


    Linz, Upper Austria does work
  20. Offline


    Sorry for the late reply on this one. I apparently got unsubscribed from all threads on the forums.

    Anyway, if you still are interested in help on this one (guessing not, but just in case) please provide the url to the RSS feed you are using, and I'll see what I can do.
  21. Offline


    anyone mind helping me find the RSS feed for Denmark? cant find it :/ (if not Denmark, UK is very close too)
  22. Offline


  23. Offline

    Don Redhorse

    hi, I'm getting this on 1597
    2011-12-16 21:11:22 [SEVERE] java.lang.NullPointerException
    2011-12-16 21:11:22 [SEVERE]     at net.cpprograms.minecraft.WeatherSync.WeatherSynchronizer.run(WeatherSynchronizer.java:43)
    2011-12-16 21:11:22 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2011-12-16 21:11:22 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    any idea?
  24. Offline


    I will look into it at some point soon, (my schedule is really full right now) but it would be really nice if you gave me some stuff to work with, since I don't currently know if this is an issue in all cases, or if it is just with your case. There's a solid chance this is an issue for all users, but just in case it is not. Please provide any errors you might see while starting up the server, and your config file. If you can think of anything else that might be useful, feel free to include it too.

    Thank you.
  25. Offline

    Don Redhorse

  26. Offline


    I actually can't reproduce this problem. I used your config file directly and ran into no problems. I think there's a chance you're dealing with a conflict between plugins, but there might be something more interesting going on here. Everything seems to be in order with your setup.

    Does this happen every time you start up, or was it a one-off thing? The only reason I can see for this happening is if a world existed when you started running this, then stopped existing while this was running.

    Is there any chance one of your worlds has the setting in multiverse that does not keep the world loaded? I did not test that case, and it's possible that this is hitting an edge case with this. You can test this by turning that setting off - if it works, I have a fix to do. If not, I'm basically out of ideas.

    If you can find out anything else about what's going on, feel free to let me know, but I really don't know how to help you otherwise.
  27. Offline

    Don Redhorse

    will take a look... yeah it is a "new" setup so it could be that there are errors... will just try with one world..
  28. Offline


    I found a potential cause for this. This could actually happen if the world is not loaded. I did not make a check that I should have in the code. I think you'll be safe to ignore these messages for now, but I will try to resolve this in a future release. I have a ticket for it in the newly-created BukkitDev project.
  29. Offline

    Don Redhorse

    thanks... will still let you know when I have everything up and running correctly..
  30. Offline


    Are you going to update to 1.2???
  31. Offline


    Well, this does not need a specific update to deal with 1.2. It did need an update for the changes done in Bukkit 1.1 RB6, however, and this update was released yesterday on the BukkitDev project, which is the official source for information about this plugin.

Share This Page