[FUN/MECH] WeatherRestrictions v2.2 - Control the Frequency of Weather [1317,1337,1.0.1-R1]

Discussion in 'Inactive/Unsupported Plugins' started by Tux2, May 11, 2011.

  1. Offline

    Tux2

    WeatherRestrictions - Control the Frequency of Weather:
    Version: v2.2


    This is a fork of the NoWeather Plugin with some changes so that you can change the frequency and the minimum delay between storms. I designed it because it rains/snows too frequently on my server, yet I don't really want to put the weather on a schedule. This has several commands to start and stop storms (respects config file) as well as optional permissions support. If there is no permissions plugin the commands are OP only.
    To configure it see the config options spoiler below.
    Note: This plugin has been completed and is now in maintenance mode. No new features will be added (except for new permissions support) unless frequently requested.

    Features:
    • Can totally stop weather
    • Toggles different aspects of the weather.
    • An option to stop snow from accumulating
    • An option to make all storms thunder storms!
    • Set the minimum delay before it can snow/rain again.
    • Set the maximum time it can rain/snow.
    • Set the max amount of time between the rainy times.
    • Control the storms with admin commands
    • Permissions (Including Bukkit Permissions) support
    • Configurable chance (disabled by default) Supercharged lightning strikes that will blow a hole in the ground.
    • Configurable explosion radius
    • Integrates with ThunderTower(optional, need to download ThunderTower if you want it to work) to prevent you from blowing your ThunderTowers up with supercharged strikes.
    Download WeatherRestrictions.jar v2.2
    Download WeatherRestrictions.jar v2.1
    Download WeatherRestrictions.jar v2.0 - For Bukkit version 1185
    Download WeatherRestrictions.jar v1.9 - For Bukkit version 1000-1060
    Download WeatherRestrictions.jar v1.8 - For Bukkit version 893-953
    Download WeatherRestrictions.jar v1.7 - For Bukkit version 860
    Download WeatherRestrictions.jar v1.1 - For Bukkit version 740
    Source Code

    Commands:
    • /wr rain <world> and /rain <world> - Makes it rain in that world. Defaults to current world if no options given.
    • /wr thunder <world> and /thunder <world> - Makes it start thundering in the current world. Defaults to current world if no options given.
    • /wr lightning and /lightning - make a lightning bolt strike in a random locationwithin a radius of 10 blocks from you. (It has the same chance as being supercharged as regular lightning)
    • /wr clear <world> and /clearrain or /rainclear <world> - Clears all thunder and rain from the world. Defaults to current world if no options given.
    • /wr stats and /weatherstats - Gives you stats on the current weather in each world.
    Permissions:
    (If you are using 1.9 or below use RandomWeather instead of weatherRestrictions)
    • weatherRestrictions.rain - Can use /rain command
    • weatherRestrictions.thunder - Can use /thunder command
    • weatherRestrictions.clear - Can use /rainclear and /clearrain command
    • weatherRestrictions.stats - Can use /weatherstats command
    • weatherRestrictions.lightning - Can use the /lightning command
    Config File Options:
    Config File Options (open)

    disable-snow-accumulation - if set to true will disable all snow accumulation in that world
    disable-ice-accumulation - if set to true will disable all ice accumulation in that world
    disable-lightning - if set to true it will disable all lightning strikes in that world
    disable-thunder - disables thunder storms in the world
    disable-weather - disables all rain/snow in a world
    supercharged-thunder-chance - Set the percentage chance that a supercharged thunderbolt will blow a hole in the ground.
    max-rain-wait - Maximum time to wait between rain storms in seconds. -1 Disables it
    supercharged-explosion-radius - Set the radius of the supercharged explosion
    thunderstorm-chance - The percentage chance that a rain storm is going to be a thunderstorm
    minimum-rain-wait - Minimum amount of time in seconds between storms
    max-rain-duration - Maximum amount of time in seconds it can rain/snow for. Set to -1 to disable this option.


    Plugin Not working correctly?
    For me to diagnose the issue properly please provide me with the following information:
    Code:
    Description of issue:
     Version of Craftbukkit:
     Version of java:
     OS:
     Other plugins installed:
    Output of console (If there are any error messages):
     WeatherRestrictions configuration file:
    
    Changelog:
    Version 2.2
    • Fixed ConcurrentModificationException bug.
    • General code cleanup.
    Version 2.1
    • Changed YML config to use new bukkit system.
    • Changed the makeall-thunderstorms to a thunder-chance variable.
    Version 2.0
    • Added Bukkit SuperPerms support
    • Added Support for the newest dev version of ThunderTower in using the new API. (1.3.1beta)
    • Changed permission nodes to match official name
    Complete Changelog (open)

    Version 1.9
    • Removed depreciated hook SNOW_FORM. Using BLOCK_FORM now.
    Version 1.8
    • Added ice prevention option.
    • Recoded weather start/stop to be thread safe.
    Version 1.7
    • Fixed a bug where supercharged lightning would not work if ThunderTower was not installed.
    Version 1.6
    • Changed default option for max-rain-wait to -1
    • Added more thread synchronization.
    Version 1.5
    • Essentials compatibility without a separate download
    • Created the command /wr and made all the other commands aliases. It now just throw an informational message up if it can't enable the shorthand commands.
    • Added the options max-rain-wait and max-rain-duration. They can be disabled by putting them at -1
    Version 1.4.1
    • Removed Stray debug text
    Version 1.4
    • Added supercharged lightning
    • Added /lightning command
    • Added ThunderTower support
    Version 1.3
    • Added the option to make all storms thunder storms
    Version 1.2
    • Added the option to disable snow accumulation
    Version 1.1
    • Added messages to let you know why /rain or /thunder didn't work in a world. (Disabled, or not enough time elapsed between storms, etc.)
    • Minor improvements
    Version 1.0
    • Added Permissions support (optional, defaults to OPs only if not present)
    • Added commands /thunder and /weatherstats
    • Added command alias /clearrain
    • Removed Debug messages
    Version 0.9.1-beta
    • Changed name to WeatherRestrictions.
    • Fixed a bug where it would never rain.
    • Added more debug lines.
    • Added the commands /rain [world] and /rainclear [world] for testing purposes. (Commands only available for OPs.) Also, the commands respect the minimum delay, and other settings of the world.
    Version 0.9-beta
    • Added the somewhat random weather.


     
  2. Offline

    jamescosten

    Tux2 likes this.
  3. Offline

    Tux2

    jamescosten likes this.
  4. Offline

    jamescosten

    Thank you very much :)
     
  5. Offline

    Tux2

    You must have installed a plugin (like essentials) that wants the thunder command. Please Download WeatherRestrictions-Essentials.jar v1.4.1, deleting the original jar, and that should go away. The latest development version detects if a command is taken and acts accordingly instead of me having to create an essentials compatible version and a regular download every time that should be out later this week. (I'm wanting to add another feature before I release it)
     
  6. You're right, seems I forgot to remove it from CommandBook in a recent custom build, thanks!
     
  7. Offline

    andune

    Thanks for the awesome plugin, exactly what I was looking for! I notice that 'max-rain-wait' config value isn't used at all, any chance of adding that feature too?
     
  8. Offline

    Tux2

    That is exactly what I am currently working on. :D Expect to see that in the next version.
     
  9. Offline

    Wayde Ultima

    So, does the "stop snow accumulation" setting work for everyone else? Because it doesn't seem to have an effect for me.
     
  10. Offline

    Tux2

    What version of bukkit and Minecraft are you using?
     
  11. Offline

    Wayde Ultima

    Minecraft 1.5_01, Bukkit 803.

    Actually, this morning, I had to uninstall the mod, because it was causing severe lag and "cannot keep up" issues. Now that I look at it, though, it might be conflicting with my Weatherman plugin. I didn't even realize I still had that installed. Time to test this.
     
  12. Offline

    Tux2

    Well, let me know how it goes. Also, if you could list the other plugins you have installed if you still have lag after removing the WeatherMan plugin I might be able to track down where it is coming from. Also, if you could post your config file for WeatherRestrictions, that would be great.
     
  13. Only weather plugin I have, so I guess this error is from this plugin? Not sure though.

    Code:
    13:37:42 [SEVERE] Exception in thread "Thread-54123"
    13:37:42 [SEVERE] java.util.ConcurrentModificationException
    13:37:42 [SEVERE]       at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
    13:37:42 [SEVERE]       at java.util.LinkedList$ListItr.next(LinkedList.java:886)
    13:37:42 [SEVERE]       at java.util.Collections.sort(Collections.java:158)
    13:37:42 [SEVERE]       at de.crannk.xPaw.RandomWeather.run(RandomWeather.java:234)
    13:37:42 [SEVERE]       at java.lang.Thread.run(Thread.java:722)
     
  14. Offline

    Tux2

    That would be from my plugin. The internal name is RandomWeather, (I should probably change that). Does that happen often, or is this the first time? I am going to look at the code and see what is causing the ConcurrentModificationException, I bet I missed a synchronized call somewhere.
     
  15. Offline

    Wayde Ultima

    Still having the issue. It doesn't start right away, though. It takes maybe fifteen minutes or so after starting up the server before the problems begin. Here's my config file (the formatting is off here, but it looks correct in the actual file):
    And here's a list of plugins: Appletree, creaturebox, General, godpowers, multiplehomes, multiverse, permissions, persistence, plgsetspawn, quickstrasse, sprint, stargate, Thundertools, Thundertower, TweakedCycle, wings, Worldedit, and Worldguard.
     
  16. Offline

    Tux2

    Well, there are 2 other plugins that I see that might be causing the issues: TweakedCycle, and ThunderTools. I'll be doing some more testing with those plugins, but would really like to know the configuration you are using for them. Also, if I still can't find out what's causing it, it would be helpful to actually chat with you in game.

    Okay, I think I fixed the bug in version 1.6. Let me know if you have any more issues.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  17. Offline

    Unknown_1

    Still getting ICE accumulation (water turns to ice). I have default config so everything is turned off. Bukkit 819 and WeatherRestrictions 1.6.

    The strange thing is I see no storm, yet I can watch my water turn to ice where it would normally be snowing at.

    Plugins:
    AfkKick 1.2
    Backup 1.6
    BananaChunk 4.6
    BigBrother 1.8 #461
    Blacksmith 1.0.3
    BOSeconomy 0.6.2
    CommandHelper v2.0.2
    dynmap v0.17
    Essentials 2.3.1
    HeroicDeath v1.8.1
    iConomyChestShop 2.73
    *LightLevel v.3
    MagicCarpet v1.5.5
    MobBounty 3.02
    MobileAdmin v3.0
    MultiInv 2.1.0
    MultiVerse 1.7.2
    OnlyOP 0.2
    Permissions v3.1.2
    *Recoil 1.3
    Stargate v0.4.8
    *TimeAnnounce 1.2
    WeatherRestrictions 1.6
    Whitelist v2.7
    WorldEdit 4.4
    WorldGuard 5.0 alpha 10
     
  18. Offline

    Tux2

    Exactly, this is a "feature" that notch introduced in 1.6: "Fixed ice so it regenerates regardless of whether it’s snowing or not."

    I'll see what I can do to prevent ice regeneration in the next version.
     
  19. Offline

    Unknown_1

    O thanks for the info. I thought this regeneration was only done while it was snowing. Thanks for looking into it.
     
  20. Not sure since when this happens.

    I have disable-weather: true in a certain world, yet it rains quite often <_<
     
  21. Offline

    Tux2

    What version of bukkit are you using? And, what does /wr stats show for that world when that happens? I know, at least for me there was a bug with bukkit regarding weather in 1.5.2 where if it was raining in one world it looked like it was raining in all the other worlds, even though /wr stats showed it to only be raining in world. If it does indeed show in the stats that it is raining in that world, I'll need the list of plugins you use, and your config from weather restrictions. If it shows that it isn't raining when it clearly is I would try the /wr clear command in that world and see if the rain goes away. Let me know the results of the tests and I'll see if it is something I can solve, or if it's a minecraft/bukkit problem. (if it is a bukkit problem, I will see about opening a bug report/adding my vote to the list, and see if I can fix the problem)
     
  22. Offline

    Ratchet

    so this is my config:

    Code:
    Midgard:
        disable-snow-accumulation: false
        disable-lightning: false
        disable-thunder: false
        disable-weather: false
        supercharged-thunder-chance: 0.0
        max-rain-duration: 300
        max-rain-wait: 10800
        supercharged-explosion-radius: 3.0
        makeall-thunderstorms: false
        minimum-rain-wait: 3600
    rainstorm has been raging now for about 10 minutes, shouldn't it stop after 5 minutes?
     
  23. Offline

    Tux2

    Hmm... it should, unless for some reason the plugins were reloaded using /reload, which would reset the timer back to the beginning of the 5 minutes. Also, please note that I haven't tested my plugin with build 857, so that might be a quirk with 857. It's not a recommended build for a reason you know. ;) Also, since build 860 just got promoted I will be testing my plugin with it to make sure everything is working correctly.
     
  24. Offline

    Ahagen550

    I am also in need of a way to disable ice growth, as the water around my floating city keeps freezing over! D:

    Looking forward to the next update.
     
  25. Offline

    Tux2

    @Unknown_1 @Ahagen550 Well, the hooks for me to be able to stop ice creation were added in the new recommended build 928! So, unless I am mistaken, expect the next update to have an option to disable ice accumulation.

    @Joy @Ratchet I think I found the source of your bugs and they have been fixed in version 1.8.

    @Unknown_1 @Ahagen550 Ice accumulation flag has been added!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  26. @Tux2
    Hello again!

    Rain is a real issue on my server since its a survival type. If it rains during daytime players have to stay in almost all day and then another night again. But i really do like the snow and from what i understand, you cant have one without the other. So my suggestion, would it be possible to have an option to make mobs burn during daytime even if it rains?
     
  27. Offline

    Tux2

    I will definitely look into that, although it may not be put into WeatherRestrictions, depending on how I code it, as it might be it's own stand-alone plugin.
     
  28. Offline

    deshadowc

    I do see you added the ability to stop ice from melting due to biome temperature. Have you also added the option to stop snow from melting due to biome temperature. Thanks in advance.
     
  29. Offline

    Tux2

    I have options to STOP ice and snow from forming, but not to stop it from melting. That is a feature i can add though.
     
  30. Offline

    deshadowc

    Yeah if the biome temp is too high it melts. I'd like to prevent this.
     

Share This Page