[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

    Tux2

    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!

    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!

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

    Tux2

    @Joy The newest version of ThunderTower(v1.3.1) and WeatherRestrictions(v2.0) are now compatible.
     
  4. Offline

    Sepulzera

    Could you add a config to set the chance that a rain is going to be a thunderstorm?
     
    Tux2 likes this.
  5. Offline

    Tux2

    Good suggestion. I will see about changing the make-all-thunderstorms to a thunderstorm-chance variable.
     
  6. Offline

    Tux2

    This is now configurable in the newest version: version 2.1. Enjoy!
     
  7. Offline

    Sepulzera

    Works, thanks :)
     
  8. Offline

    kalez

    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)
     
  9. Offline

    Tux2

    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.
     
  10. Offline

    kalez

    Awesome! Have been using this plugin forever, and we LOVE it!
     
  11. Offline

    kalez

    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!
     
  12. Offline

    Tux2

    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!
     
  13. Offline

    veN1337

  14. Offline

    Tux2

    That sounds like an issue with the ProperTime configuration, not WeatherRestrictions. Mind posting what version of CraftBukkit you are using, the plugins installed, and the configuration for WeatherRestrictions and ProperTime?
     
  15. Offline

    veN1337

    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 :)
     
  16. Offline

    Tux2

    :) And that's why I asked for your plugin list. Glad to know that the problem is fixed.
     
  17. Offline

    Neillithan

    Is there a way to set a minimum rain duration?

    If not, I request minimum rain duration. :)

    -Neil
     
  18. Offline

    Tux2

    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?
     
  19. Offline

    Neillithan

    Hours. lol

    I'm not even joking. :)
     
  20. 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
     
  21. Offline

    Tux2

    You aren't using the latest version of WeatherRestrictions. I fixed that exception in the newest version: 2.2.
     
  22. 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!
     
  23. Offline

    Tux2

    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.
     
  24. 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.
     
  25. Offline

    Tux2

    That's quite a bummer. :( I did a little looking around though and it looks like if you just want the effect (No real lightning) You can try NoSmoking. Here's a video of it in action: http://www.youtube.com/watch?feature=player_detailpage&v=eLyBIQF9tL8#t=179s Hopefully this helps!
     
  26. I'll try it right when I get home! Many thanks for the link :)
    EDIT: Yeeeeeeees! Thank you so mutch! If I use NoSmoke with you WeatherRestrictions and the lightning chatching tower's plugin (I don't remember the name :S) I get almost the effect I want! :D
    Thaaaaank you!
     
  27. Offline

    maestrorw

    Are you planning to update this plugin for 1.2.3?
     
  28. Offline

    Tux2

    You're looking at the old thread. The latest version on bukkit dev is working just fine with 1.2.3!
     
  29. Offline

    md_5

    Long time no see Tux2. You will notice that this thread has now been placed into the Inactive Plugin subforum.
    If you wish to revive this plugin, please ensure that you update and test compatibility with the latest recommended Bukkit build before reporting your original post, asking for it to be moved back to the release forum.

    Thanks for your time.
    md_5
     

Share This Page