[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


    Wow. This is such a great idea. This complements the plugin that makes your server the same time as your time zone. Amazing job!
  3. Offline


    I don't do much with SSP mods, and I don't really intend to get into them. If someone else wants to turn it into a single player mod however, you've got my full permission. I'll even put a link in my post to it.

    use an action verb?

    I didn't realize that already existed, however I shouldn't be surprised. I'll link people who want that feature to that plugin, rather than adding the functionality to this, then. Thanks.

    Find me a better source that I can get easily-parsed results from and I'll use it. Particularly if it allows me to get weather for more areas.
  4. Offline


    For some reason, the plugin does not seem to update...

    By this I mean, the weather here is thunder/lightning which when you start the server it works. But after a bit, it goes back to sun and stays like it. It hasnt updated for over an hour and the status on the websie still says thunder/lightning.
  5. I'm not sure if entire Europe actually works ?
    im getting an error as well on server start up every time. And I live in denmark :/

    2011-04-24 04:00:48 [SEVERE] null loading WeatherSync v1.0 (Is it up to date?)
        at com.bukkit.cppchriscpp.WeatherSync.WeatherSync.onEnable(WeatherSync.java:97)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:584)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
  6. Offline


    love it and i live in the bay area to so kinda perfect:}
  7. Offline


    Wow, the only time where I wish I did not live in California haha. Got to find a place where the weather is almost like 50-50.
  8. Offline


    I suggest Scotland (or almost anywhere in the UK). In here it rains pretty much 50/50. It's also common with short burst showers so you don't always have a 12 hour play-session of only rain :).
  9. Offline


    Not sure what's going on, but I have a hunch. Please comment out the line in your config where you set either city or state to equal nothing.

    This bug will be fixed in a new version; please let me know if this change does not fix anything.

    Next time, please provide more information about your setup, so I can attempt to recreate things. If this fix fails to work, please provide (at least) your config file and your version of bukkit.

    Hope this helps!

    Haven't heard this from anyone else; next time happens check your server log to see if any errors came from weathersync. It is possible that the plugin broke somewhere, and this caused it to stop. It is also just possible that I don't set the duration of the weather long enough. At any rate, get back to me and I'll try to fix this for you. The temporary fix is just a server restart, sadly.

    Thanks for the report.
  10. Offline


    I cant put the source folder into my ftp anyone know how to fix that?
  11. Offline


    Calgary, Alberta Canada - T2E 6W5 (Area Code for Calgary YYC International Airport) I live in Calgary my self, 2 weeks ago there was a snowstorm, right now its sunny, and tomorrow its gonna be cloudy.
  12. Offline


    So if I install this and say make it so the weather is tied to Seattle and use RealTime will my users start getting Seasonal affective disorder from playing minecraft?

    This is a great idea thanks!
  13. Thanks for the plugin, that's a great idea. However, I'm not completly sure how to set up an german city as reference. There are no so-called "EU Zip Codes", when I query the Wunderground website with my german zip code, it leads me to an american town :)
    Could you add the ability to use the station url numbers? E.g. Berlin has the station url
    so the number used in the url would be 10389

    Edit: I took a brief look into your source code. You're fetching the results via RSS, so the corresponding RRS url is
    http://rss.wunderground.com/auto/rss_full/global/stations/[station number here].xml
    This file also serves weather "Conditions:"

    Now I found this nice work-around. Insert this into the configs "zip" statement:
    zipcode: global/stations/40650
    With this line, your server always has the same weather as Bagdad :p
    Just replace the number with the desired station url number.
  14. Offline


    Just checked the server.log history and I can't see any errors that have cropped up. I changed the update time to 2 minutes just to see if it was down to the server turning it off after a certain amount of time but I don't think that solved the issue either.

    Just a question; does the server still randomly generate rain even though your plugin says its supposed to be sunny?
  15. Offline


  16. Offline


    Thanks a lot for this. I have yet to see if it works for me, though, since it's been sunny all day :D
  17. Offline


    Time Synchronization (No need! A plugin already exists for this; see below)

    whaa? I thought the one making this abandoned the plugin :S link please ? o.o
  18. Offline


    Possible; I think I need to play with the duration of weather.
    Use that for now. It will work just fine. I'll add weather stations with the next update. I know someone else had this concern too; sorry, but I'm not gonna quote your post too. :p
    The paragraph below that has a link to it... it seems to be updated for 705 so it sure doesn't look abandoned.
  19. Offline


  20. Offline


  21. I may have found a bug: It's currently raining on my server, however wunderground tells me:
    Conditions: Mostly Cloudy
    The console didn't trow any errors, so I assume the weather was fetched sucessfully. Looking at your code, "Mostly Cloudy" should result in "CLEAR" weather. Does your plugin block the regular randomly generated weather? (Is this even necessary?)
  22. Offline


    It.. doesn't. It should, but it doesn't. The weather should theoretically resync every 5 minutes by default, however. If this isn't happening, that's troubling. I will be looking into it when I have a few free minutes.

    Sorry I missed your post earlier; you don't need the source folder. That's the source code to the plugin.
  23. Offline


    hmmmm i downloaded the plugin and installed correctly and all, but it says that it's not up to date. im using craftbukkit 714 if you need to know
  24. Offline


    You've provided me with absolutely no information about the problem, so there is no way for me to help you.
  25. Offline


    the thing is that if u live in socal it always sunny bu today it was a bit cold :D
  26. Offline


    Great idea! You also have excellent coding habits.

    Although, I must suggest removing *.bukkit from your namespace as it violates development conduct.
    Bukkit Namespace Guidelines
  27. Offline


    Yep, directly followed the tutorial for creating plugins back when I made my first one, which said to do this. As such, I assumed I was following proper coding practice, which was reinforced by the closing of the namespace which did not affect me in any way. Looking closely though, they did not okay what was in the tutorial at all.

    As such, this will be changed in the next version of both plugins; thank you for bringing this to my attention.

    (I really swore I saw something specifically saying this was okay, too. I can't find it, so I'm going to have to assume I'm wrong..)
  28. Offline


    Nice plugin, the only thing is that I got this error-type-thingy when I reloaded my server:
    I don't really know if it works, because it's sunny is out here (The Netherlands), but I think so. :)
    Why does it need to be sunny when I want it to rain? It's always raining out here, but not when I want! :p
  29. Offline


    That doesn't look like it worked at all; what version are you using? That method should be defined unless a new version came out that changed the weather API on me, or you're using a version before the weather API. (Both possible)
  30. Offline


    I have Bukkit build 707 (well, that's what it says when I type /about in the chat).

Share This Page