[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

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    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:

    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

    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.



    This post has been edited 10 times. It was last edited by Tux2 Dec 20, 2011.
  2.  
  3. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Whoops, sorry about that, just updated the link. Just to let you know, this plugin is on BukkitDev as well and all previous files can be found in the "File" section of there as well.
  4. Offline

    Jdbye

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Link is still broken. Downloading from BukkitDev works though.
  5. Offline

    Sepulzera

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I have to activate the rain for the nether, that rain is activated in my world... oO
    Everything else is working fine.
    Using CB1185, WeatherRestrictions v2.0
  6. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Are you saying that when you tell it to rain in the nether it starts raining in your world as well? If so would you mind telling me the output of: /wr stats Also, I am unable to duplicate this on my server. Also, please make sure to read the opening post and post all the other information it requests....
  7. Offline

    Sepulzera

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Nvm, you changed the settings for world and world_nether in the config file (when generated). Was too tired to notice it. Sry :(
  8. Offline

    merangel

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    i keep getting "uh oh, weather is disabled in this world"


    Description of issue: won't let me change the weather Version of Craftbukkit: 1185 Version of java: not sure OS: Vista (but i'm hosting via Taco Nation) Other plugins installed: creaturebox, PLGSetspawn, Sortal Output of console (If there are any error messages): uh oh, weather is disabled in this world WeatherRestrictions configuration file:



    This post has been edited 1 time. It was last edited by merangel Sep 30, 2011.
  9. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hmm... might help if you changed the "disable-weather: true" to "disable-weather: false"
    The plugin's default is to disable everything, then have you manually enable what you want. Also, thanks for reading how to submit an error report I appreciate the effort!

    This post has been edited 1 time. It was last edited by Tux2 Sep 30, 2011.
  10. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Ugh, uploaded 1.9 like 5 times to github, still wouldn't take... The link now points to the bukkitdev mirror of it now. Thanks again for the notice!
  11. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @Joy The newest version of ThunderTower(v1.3.1) and WeatherRestrictions(v2.0) are now compatible.

    This post has been edited 1 time. It was last edited by Tux2 Oct 28, 2011.
  12. Offline

    Sepulzera

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Could you add a config to set the chance that a rain is going to be a thunderstorm?
    Tux2 likes this.
  13. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Good suggestion. I will see about changing the make-all-thunderstorms to a thunderstorm-chance variable.
  14. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    This is now configurable in the newest version: version 2.1. Enjoy!
  15. Offline

    Sepulzera

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Works, thanks :)
  16. Offline

    kalez

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    updated to 2.1 and every so often i get this:

    2011-12-16 07:52:08 [SEVERE] Exception in thread "Thread-18868"
    2011-12-16 07:52:08 [SEVERE] java.util.ConcurrentModificationException
    2011-12-16 07:52:08 [SEVERE] at java.util.LinkedList$ListItr.checkForComodification(Unknown Source)
    2011-12-16 07:52:08 [SEVERE] at java.util.LinkedList$ListItr.next(Unknown Source)
    2011-12-16 07:52:08 [SEVERE] at java.util.Collections.sort(Unknown Source)
    2011-12-16 07:52:08 [SEVERE] at tux2.weatherrestrictions.WeatherRestrictions.run(WeatherRestrictions.java:233)
    2011-12-16 07:52:08 [SEVERE] at java.lang.Thread.run(Unknown Source)
  17. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Thanks for the bug report. I have tracked it down and I am now testing it to make sure everything is working properly. Should have a new build out within 24 hours.
  18. Offline

    kalez

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Awesome! Have been using this plugin forever, and we LOVE it!
  19. Offline

    kalez

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    hey, um, its been more than 24 hrs :p just sayin

    and weve been having this lag issue on our server over the past week, and as far as we can tell its been because of this plugin. were only half way through testing, but this is the only one so far that caused us any problems. it actually crashed us.

    hopefully that update will still allow us to use this plugin!

    This post has been edited 2 times. It was last edited by kalez Dec 20, 2011.
  20. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Sorry about the delay, I've been extremely busy lately and the time I thought I had didn't free up. I'll try to make sure it's thoroughly tested though before too long though, and if you are experiencing any lag with my plugin this update should fix it as well. If you could either PM me the list of plugins you are using or just list them here that would be great as well.

    EDIT: I just uploaded the new version! This should fix any lag issues you were experiencing with this plugin as well, enjoy!

    This post has been edited 1 time. It was last edited by Tux2 Dec 20, 2011.
  21. Offline

    veN1337

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  22. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  23. Offline

    veN1337

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    CraftBukkit is 1.0.1R1 (1597)
    Your plugin works fine until i enable properTime.
    properTime cfg:
    Code:
    # Use 2 for double speed, 3 for triple, etc.
    # At 1x speed, the complete day-night cycle takes 20 minutes.
    
    world: "Survival1"
    timespeedDay: 0.33
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: -1 # less than 0, so will be ignored
    
    world: "pvpworld"
    timespeedDay: 1.0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: 18000 # less than 0, so will be ignored
    WeatherRestriction cfg:
    Code:
    Survival1:
      disable-weather: false
      disable-thunder: false
      disable-lightning: false
      disable-snow-accumulation: false
      disable-ice-accumulation: false
      minimum-rain-wait: 600
      max-rain-wait: -1
      max-rain-duration: 300
      thunderstorm-chance: 35.0
      supercharged-thunder-chance: 0.0
      supercharged-explosion-radius: 3.0
    
    Looks like "perma: 18000" which sets only the time of pvpworld to 02:00AM,
    is used for Survival1 too, if both plugins are enabled.


    EDIT: OK, nevermind. Updating the Multiworld plugin fixed the issue :)

    This post has been edited 1 time. It was last edited by veN1337 Dec 21, 2011.
  24. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    :) And that's why I asked for your plugin list. Glad to know that the problem is fixed.
  25. Offline

    Neillithan

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Is there a way to set a minimum rain duration?

    If not, I request minimum rain duration. :)

    -Neil

    This post has been edited 1 time. It was last edited by Neillithan Dec 30, 2011.
  26. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Minimum rain duration? Not at the moment, but I can definitely add that. How long were you looking at setting the minimum rain duration to anyways?
  27. Offline

    Neillithan

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hours. lol

    I'm not even joking. :)

    This post has been edited 1 time. It was last edited by Neillithan Dec 31, 2011.
  28. Offline

    Semirotta

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Code:
    
    2012-01-03 21:54:41 [SEVERE] Exception in thread "Thread-13"
    2012-01-03 21:54:41 [SEVERE] java.util.ConcurrentModificationException
    2012-01-03 21:54:41 [SEVERE] 	at java.util.LinkedList$ListItr.checkForComodification(Unknown Source)
    2012-01-03 21:54:41 [SEVERE] 	at java.util.LinkedList$ListItr.set(Unknown Source)
    2012-01-03 21:54:41 [SEVERE] 	at java.util.Collections.sort(Unknown Source)
    2012-01-03 21:54:41 [SEVERE] 	at tux2.weatherrestrictions.WeatherRestrictions.run(WeatherRestrictions.java:233)
    2012-01-03 21:54:41 [SEVERE] 	at java.lang.Thread.run(Unknown Source)
    
    i get this sometimes, i dont know why. I believe its coz of this plugin coz it says weatherrestrictions.run plaaplaa.
    Anyway , can u help?

    i use bperms, bukkit
    1.0.1-R1
  29. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    You aren't using the latest version of WeatherRestrictions. I fixed that exception in the newest version: 2.2.
  30. Offline

    Sagewind

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    works great, but I've been thinking...
    I know the plugin is about preventing storm, rain, etc, but could you add something like a lightning hitting in a specified location every specified seconds? With no rain/storm. Just lightning.
    It would be great!
  31. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Hmm... yeah, that one is just a bit out of scope of this plugin. Probably the best idea is to find a region plugin that allows lightning to strike certain regions at certain intervals.
  32. Offline

    Sagewind

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I did… seems that the plugin is dead ._.
    Anyway, thanks for answering ^_^
    I'll try to look for another thing. And, like I've said before, great plugin.

Share This Page