WeatherSync
WeatherSync
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!
You can 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.
Download (This could be more recent than the version on this site if they have not approved the latest version yet. I strongly suggest using this link instead.)
Time synchronization:
Some people have 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 for this!
FINDING THE RSS FEED
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://classic.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:
http://rss.wunderground.com/auto/rss_full/global/somestuff.xml?units=english
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.
@drew5494
That was quick, but you missed a few of the things I asked for. (I used the wrong formatting for my list so it looked pretty ugly. I can't blame you!)
At any rate, could you also provide a list of plugins, and the names of the world(s) you see that are behaving unusually? I'm going to try to recreate the problem on my machine, so that I can understand what is going wrong.
update: Actually, one other question. When you say it affects other worlds, does that mean the weather changes in all worlds? Just want to be clear.
@cppchriscpp
Thanks for the response. That would be the very latest version of spigot 1.8 http://pastebin.com/UYZ186PU
@drew5494
So this is definitely a strange one - especially considering this code hasn't really changed since 2011. I'm going to need a bit more information to dig into this one. Could you please provide:
Sorry to ask for so much, but this one is extremely odd, and I'm really unsure of how to start debugging it.
Hey just an issue I found, when I added weather for one world it affects all other worlds too. Please help!
@cppchriscpp
Too bad I was really looking forward to that. I find this plugin the most amazing out of all the plugins because of how it changes weather as it is in real life. I really hope someone is willing continue this plugin and add this feature as I have no knowledge in coding at all.
@drew5494
That's one of the two "pretty hacky" ways to make snow work that I've considered.
The problem with that approach is that I would have to do that for every x/z coordinate in every chunk currently loaded whenever the weather changed. This would likely cause extreme lag, which would get worse with every player in the game that has ventured out from spawn.
The other option which is a little bit more likely is to manipulate packets going to the client to tell them what type of weather is happening. I'm not sure if this is still possible, but that would be hacky, but a lot more doable.
Sadly, I have not had much time to update this plugin, and I don't foresee that changing too soon. (Though my sources are open if someone else wants to take a crack at it!) I do have an issue tracking this request here: https://github.com/cppchriscpp/WeatherSync/issues/2
Sorry to disappoint, but I don't see myself being able to add this feature any time soon.
Can you add a feature where if it were to snow, it would change the biomes and make it snow in minecraft?
@drew5494
Thank you for finding this! That is a much better way of finding RSS feeds than I had. I've updated the description to match.
To the person who asked about snow and deleted the post, unfortunately I can't support that without a lot of work - minecraft chooses to show snow or rain based on the biome you're in, so I would have to do something pretty hacky to make snow and rain appear everywhere. (Though I have considered it)
Alright for anyone using this plugin and need to find the rss feed use this link: http://classic.wunderground.com
The new weather underground website doesn't offer RSS.
@cppchriscpp
Thanks a lot. The error is fixed now :)
@bbayu
Yeah, I just checked and the file is still sitting at "needs approval". I'm guessing the bukkitdev staff aren't all that active today. Since the staff change I think they likely do a bit less on the weekends.
It'll be there as soon as someone takes a look though!
@cppchriscpp
Thanks for the update, I'll try using it. (Well, I don't see it by the time I post this, still waiting...) Btw, the weather changes now :)
@bbayu
I think I have it nailed down. I've just thrown up a new 2.1.5 release that should solve the problem. (On my site now; should be on this site within a few hours)
I was doing weather updates in another thread to save some strain on the main bukkit process, but I also sent this event out from my secondary thread, which caused that plugin to try to modify blocks in a secondary thread. (That = bad)
For now, I've moved my thing to a synchronous task. I'm a touch worried about performance with this, but it is the easiest solution by far. Let me know how it works out for you - if performance does become a problem, I have another slightly more involved idea.
@cppchriscpp
Thanks very much
. . .
Oh wow, it's really spamming the logs even when no one is on :/
. . .
I updated the pastebin to a newer version, it spams the logs every 5 mins -.- http://pastebin.com/L0sty4Ee
@bbayu
That is certainly strange. I'll try to make sense of this over the coming weekend. No promises, but I'm hoping I can help you sort this out.
@cppchriscpp
I checked the logs before the plugin was installed, and this wasn't happening to me.
I tried disabling the plugin and doing /toggledownfall, and there isn't any error popping up. But when I enabled the plugin and it kicked in to change the weather, the same error popped up.
And my server is running on 1.7.10.
There will be a chance of rain 3 days later so maybe I can see the plugin changing the weather :)
@bbayu
I can't be certain, but I strongly suspect that the error is a problem with the StreetLightsReloaded plugin. What happens if you change the weather manually without WeatherSync loaded? (/toggledownfall should work - otherwise wait for a natural weather change)
I don't explicitly test for compatibility with other plugins, (unless I know of an issue) but there is no reason that this should break things, to my knowledge.
Let me know if that is the case - if it only happens with WeatherSync, I can spend some time digging in and try to figure out what is going on.
Additionally, there is a comment on the plugin that says it is broken with 1.8, and it hasn't been updated since 2013. This points to the other plugin potentially being broken, or not handling that event correctly.
@cppchriscpp
Well, I'm still testing if it works. But I always get an error when the weather is syncing. It says Could not pass event WeatherChangeEvent to StreetLightsReloaded v1.1.3. Is it... not compatible.. or I'm using an old version? http://pastebin.com/L0sty4Ee (link expires in a week)
@bbayu
I ran through it myself and got http://rss.wunderground.com/auto/rss_full/global/stations/45007.xml
I know in the past non-US locations were a bit of a challenge, and I didn't support them. I can't promise that URL will actually work.
If it doesn't work, let me know. I'm not at a PC with java development tools on it right now, but I can take a peek.
@cppchriscpp
Thanks for the reply, your method worked on me, but I'm unsure about the URL I see. I live in Hong Kong.