[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

    Rytharr

    Today Ice just started forming like crazy I can use /thaw but its back in a matter of mins I tried this plugin but im still getting ice
     
  3. Offline

    Tux2

    For me to diagnose this issue properly please provide me with the following information:
    Version of Craftbukkit:
    Version of java:
    OS:
    Other plugins installed:
    WeatherRestrictions configuration file:
     
  4. It was working fine on earlier builds so i guess they made a change recently that effects snow. Im not posting rest of info unless you say you want it, since its caused by bukkit changes.

    WR: 1.8
    CB1033 (and higher)

    2011-07-28 14:11:18 [SEVERE] Error occurred while enabling WeatherRestrictions v1.8 (Is it up to date?): SNOW_FORM
    java.lang.NoSuchFieldError: SNOW_FORM
    at de.crannk.xPaw.RandomWeather.onEnable(RandomWeather.java:88)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  5. SNOW_FORM is indeed deprecated, has been for months, needs updating :)
     
  6. Are you planning to update this? Otherwise I could see if someone else could fix it, just would like to know, ty :)
     
  7. Offline

    Tux2

    Yes, I actually have a test build I am testing right now. Should be out sometime within 12 hours.

    @Sorken @Joy Updated. I still need to add in the built in Bukkit permissions, but all depreciated hooks have now been updated.

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

    maio290

    Hi Tux2,

    here is a description of my issues with CB 1038:

    Description of issue: Commands are like the echo command from unix if i write /clearrain, /lightning, or anything else the output will result in that command.

    2011-08-03_14.22.00.png

    Version of Craftbukkit: 1038

    Version of java: java-common 0.40, openjdk-6-jre-lib 6b18-1.8.7-2~squeeze1, openjdk-6-jre-headless 6b18-1.8.7-2~squeeze1

    OS: Debian Linux 6.0

    Other plugins installed: WorldEdit, WorldSafe, AntiCreeper, AutoSave, FalseBook, HomeX, Guestprev, Lightvote, SimpleGive, Sortal, SpawnX

    Output of console (If there are any error messages): -

    WeatherRestrictions configuration file:

    world_nether:
    disable-snow-accumulation: true
    disable-lightning: true
    disable-thunder: true
    disable-weather: true
    supercharged-thunder-chance: 0.0
    max-rain-wait: 1000
    supercharged-explosion-radius: 3.0
    makeall-thunderstorms: false
    minimum-rain-wait: 600
    world:
    disable-snow-accumulation: true
    disable-lightning: false
    disable-thunder: false
    disable-weather: false
    supercharged-thunder-chance: 0.0
    max-rain-wait: 1000
    supercharged-explosion-radius: 3.0
    makeall-thunderstorms: false
    minimum-rain-wait: 600
    disable-ice-accumulation: true
    max-rain-duration: -1


    I'm really looking forward if you fix that.

    Sincerely,

    maio290
     
  9. Offline

    Tux2

    Hmm.... I just tested it on my computer and I am unable to reproduce the issue you are having using your exact setup (except I am using Fedora instead of Debian). Also, please try re-downloading the file as your browser might have cached an older version.
     
    maio290 likes this.
  10. Offline

    maio290

    And that really fix'd the problem. oO

    Thank You ;)
     
  11. Offline

    Smidds

    Hey, im just curious, is there a way to have non-stop rain? A buddy of mine in my server likes the rain and has requested it be non-stop. Any ideas?
     
  12. Offline

    Tux2

    Code:
    max-rain-wait: 0
    minimum-rain-wait: 0
    max-rain-duration: -1
    
    Those values should keep it raining constantly.
     
  13. Offline

    Raserron

    "WeatherRestrictions" doesn't work with "CraftBukkit 1060".
    But I think better wait as an plug-in with bugs...
     
  14. Offline

    Xordaii

    Not sure why it wouldn't work with 1060. Seems to work fine, I use it to limit how often it rains, and on one world at least, make sure it never does. Does what I want it to do. If you tried with 1060 and are having issues, go ahead let us know what you wanted to happen, how you had it configured, and any error issues you get? Doesn't work on **** isn't very precise or detailed.
     
  15. Offline

    acekid2

    I also request you add an option to keep snow/ice from melting due to biome temperature. Maybe also include an option to keep snow/ice from being melted by light sources, though I know this is a little bit different from the purpose of this plugin. Nevertheless it would still be a cool addition to this plugin.

    Edit: I tested it out and snow/ice isn't melting due to biome temp in my server. I assumed the other user knew what he was talking about, but now I'm not sure if snow/ice melts due to biome temp. If it does though it would still be useful to disable it.
     
  16. Offline

    Tux2

    @acekid2 Correct, ice will not MELT in a biome unless a heat source: fire, lava, or a torch is placed next to it. Although it will FORM in the correct biomes if not disabled by my plugin.
     
  17. How about an option to force melting off completely? Ive been considering making ice droppable from breaking ice blocks but i cant have it melting all over the place when people puts down torches :)
     
  18. TT dev says this is WR issue:

    Code:
    19:38:40 [SEVERE] Could not pass event LIGHTNING_STRIKE to WeatherRestrictions
    java.lang.NoSuchMethodError: org.rominos2.ThunderTower.ThunderTowerSettings.getProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
            at de.crannk.xPaw.RandomWeatherWeatherListener.onLightningStrike(RandomWeatherWeatherListener.java:124)
            at org.bukkit.plugin.java.JavaPluginLoader$85.execute(JavaPluginLoader.java:840)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.WorldServer.strikeLightning(WorldServer.java:121)
            at org.bukkit.craftbukkit.CraftWorld.strikeLightning(CraftWorld.java:337)
            at com.nisovin.magicspells.spells.LightningSpell.castSpell(LightningSpell.java:69)
            at com.nisovin.magicspells.Spell.cast(Spell.java:204)
            at com.nisovin.magicspells.Spell.cast(Spell.java:170)
            at com.nisovin.magicspells.MagicPlayerListener.onPlayerInteract(MagicPlayerListener.java:96)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:314)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:139)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:805)
            at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:35)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:453)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    http://forums.bukkit.org/threads/fu...catch-lightning-1060.15482/page-6#post-659971
     
  19. Offline

    Tux2

    @Joy he must have changed something in ThunderTower. I will download the latest and re-link.
     
  20. Any news?
     
  21. Offline

    EmpiricalDepth

    Just FYI incase anyone wants to know tested and works for me in 1160 XD
     
  22. Offline

    Tux2

    With 1.8 coming out I'm kind of holding off on releasing an official fixed version, although I do have a testing version I will send you (should work just fine)
     
  23. Offline

    1cec0ld

    I'm glad to know this is still being maintained, my version (old as dirt) can't register snow_form, and its really blanketing everything in a mess. I was hoping a reinstall of WR when we update to 1.8 and 1185 would fix it, thank you for keeping it somewhat current!
     
  24. Offline

    Tux2

    No problem! I use all my plugins on my server so if something breaks in bukkit I kind of have to fix it. One of the new things I'm working on is bukkit permissions, since it supports multi-world permissions now. Right now I'm collaborating with the author of ThunderTower to make sure that they are going to be 100% compatible for the foreseeable future so I'm working with a beta copy that he hasn't released yet. Once he releases the new version expect this plugin to update!
     
  25. Offline

    Jdbye

    Fix the link to 1.9 please, I'm still on bukkit 1060 and I get access denied when I try to download it.
     
  26. Offline

    Tux2

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

    Jdbye

    Link is still broken. Downloading from BukkitDev works though.
     
  28. Offline

    Sepulzera

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

    Tux2

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

    Sepulzera

    Nvm, you changed the settings for world and world_nether in the config file (when generated). Was too tired to notice it. Sry :(
     
  31. Offline

    merangel

    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:


     

Share This Page