[FUN/ADMN] WeatherGod v0.31 - Play with the weather [818]

Discussion in 'Inactive/Unsupported Plugins' started by FrozenBrain, Apr 22, 2011.

  1. Offline

    FrozenBrain

    WeatherGod - Play with the weather
    Version: v0.31
    CraftBukkit: 818

    This plugin allows you to easily control the weather.



    Features:
    • Control the weather
    • Turn the damage of lightnings on and off
    • Enable or disable certain weathers
    • Kill players with lightning bolts
    • Create lightning bolts where you want
    Download WeatherGod v0.31
    Source Code

    Usage (parameters in <> are required, the ones in [] are optional:
    • /wg set <normal|storm|thunder> [world] [duration in sec.]
      • Set the current weather of a world.
    • /wg get [world]
      • Get the current weather of a world.
    • /wg strike
      • Toggle the creation of thunder bolts with the thunder item.
    • /wg strike <Playername|MobID>
      • Kill a player or a mob with a thunder bolt. You can get a mob's ID by pressing F3.
    For worlds with spaces in their names use a '_' instead ('My World' => 'My_World').

    Configuration:
    • thunderItem (def. (stick): 280)
      • The item to use for the creation of thunder bolts.
    • allowNormal / allowStorm / allowThunder
      • Enable or disable certain weathers.
    • preventIgnition
      • Set this to true to block the ignition of blocks by a lightning.
    • thunderMouseButton ('left' or 'right')
      • Select which mouse button to use for the creation of thunders with the thunderItem.
    Permissions:
    • weather.get
      • Use /wg get
    • weather.set.normal / weather.set.storm / weather.set.thunder
      • Use /wg set
    • weather.strike.player
      • Use /wg strike <Playername|MobId>
    • weather.strike.item
      • Use /wg strike
    • weather.invulnerable
      • Don't take damage from lightnings
    Changelog:
    Version 0.31
    • Updated for Minecraft 1.6.6 (CraftBukkit b818)
    • Changed the command from /weather to /wg
    • Added the /weathergod alias for the /wg command
    Show Spoiler

    Version 0.30
    • Remade the commandhandler (thx mrapple)
    • Commands sent from the console are working correctly now
    • You can now set and get the weather of worlds with spaces in their names (see 'Usage')
    • You can now kill mobs the same way you kill players
    Version 0.22
    • Updated for CB 733
    • Better check for changed weather
    • Added 'thunderMouseButton' to the config
    Version 0.21
    • Added permission weather.invulnerable
    • Added the ability to enable or disable weathers
    • Added an setting to turn off the ignition of blocks by lightnings
    Version 0.20
    • Added /weather strike
    • Added /weather strike <Player>
    Version 0.12

    • You can now change the weather to a thunder storm.
    Version 0.11

    • Added support for permissions
    • Added the ability to set a duration for the weather
    • Added a command to get the current weather of a world
    Version 0.1

    • First release



    Have fun :)
     
  2. Offline

    br0ad456

    cooooooool
     
  3. Offline

    SirHedgehog

    Haha looks like we both had similar ideas, I just release "Wrath"
     
  4. Offline

    d3p1

    Great little plugin. Thank you! :)
     
  5. Offline

    FrozenBrain

    Nice :D

    Update
    • Added support for permissions
    • Added the ability to set a duration for the weather
    • Added a command to get the current weather of a world

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  6. Offline

    d3p1

    Would it be possible to add a permission node that allows the users to set the individual weather?

    I'd like my players to be able to turn storms off, but not really turn them on.
     
  7. Offline

    FrozenBrain

    Thanks for the suggestion, I'll add that later.

    And another update. Now you can control thunder bolts as well.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
    d3p1 likes this.
  8. Offline

    Ryole

    Uhm. I think you're german right?
    Can you please visit my teamspeak and help me with a big problem?
    Ty.
    LG Ryole
     
  9. Offline

    2rockon

    Nice plugin!

    One small question: How come when I use the lightning item on a tree, the fire on it goes out but when I stand on a tree and do "/weather strike 2rockon" it sets it on fire and the fire then has spread when I go back?

    2rockon
     
  10. Offline

    FrozenBrain

    I don't know. Both, strike and strike <Player> are using the same API method so they should act the same way.
     
  11. Offline

    werwew19

    Possible to add snowstorms to different climates besides the snow + ice areas?
     
  12. Offline

    lolligertyp

    Thank you, the only working weather plugin for me :)
    EDIT: Now I use CommandBook for General and Weathergod.
     
  13. Offline

    Lars1011

    Hey whenever i try to use the
    Code:
    /weather strike
    command i get a Error:
    Code:
    09:36:57 [SEVERE] Could not pass event PLAYER_INTERACT to WeatherGod
    java.lang.NoSuchMethodError: org.bukkit.World.strikeLightning(Lorg/bukkit/Location;)Lorg/bukkit/entity/LightningStrike;
        at de.frozenbrain.WeatherGod.listeners.wgPlayerListener.onPlayerInteract(wgPlayerListener.java:26)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:252)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:133)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:717)
        at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:35)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:73)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    And when i use the command
    Code:
    /weather strick <player>
    I get another Error:
    Code:
    org.bukkit.command.CommandException: Unhandled exception executing command 'weather' in plugin WeatherGod v0.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:650)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:613)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:607)
        at net.minecraft.server.Packet3Chat.a(SourceFile:36)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:73)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NoSuchMethodError: org.bukkit.World.strikeLightning(Lorg/bukkit/Location;)Lorg/bukkit/entity/LightningStrike;
        at de.frozenbrain.WeatherGod.commands.wgWeatherCommand.onCommand(wgWeatherCommand.java:100)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    
    The Plugins that i am using are:
    - AssignPermissions
    - General
    - GiveIt
    - HomeSweetHome
    - iChat
    - Lockette
    - Mobiile
    - Permissions
    - WeatherGod
    - WorldEdit
    - WorldGuard
    - WormholeXTremeWorlds

    It might be because i am using the CB Build: 674
     
    DeaGato likes this.
  14. Offline

    FrozenBrain

    Not yet. I don't event think this will be possible in future builds.

    Update your server to at least CB Build #709.
     
  15. Offline

    Lars1011

    oh ok
     
  16. Offline

    2rockon

    Just had an idea: you could make it so that any mob that you kill with lightning that you summoned adds to the statistic "Mobs Killed". That would be awesome as I could sit on the hill that my base is on, killing all the mobs that spawn down in the valley.

    2rockon
     
  17. Offline

    ashour

    can u make it op only can do this? and is it possible to den starting fires with lighting?
     
  18. Offline

    Rabb

    Is there any way you could effectively turn weather off (or at least just lightning) for an infinite period of time?

    Many houses on my server are made of wood, and the threat of lightning isn't sitting too well with them.
     
  19. Offline

    Schnabi77

    Can you try to make it snow in a forest?
     
  20. Offline

    Unscrewed





    FIRST Sentence:
    People, Learn to READ., God I hate lazy people.
     
  21. Offline

    FrozenBrain

    Good idea! Added this to my todo list.

    Nope.
     
  22. Offline

    2rockon

    Found a bug (could be in craftbukkit)

    If you right click (not left click which triggers blolt) on a door to open it, with a stick in your hand, and dont have your crosshair on any of the blocks around the door, then a lightning bolt will be created on what looks like the doors base block. This 9/10 times it kills you.
     
  23. Offline

    FrozenBrain

    That's definitely caused by craftbukkit. However I'll try to fix it.
     
  24. Offline

    2rockon

    Found the bug that stops fire spreading and have fixed it in a copy which I compiled. When you click on a block, the lightning hits its coordinate, but it hits the block (not the one above it), and the fire spread to blocks next to it. This is why trees didnt set on fire, as the blocks next to the leaf block where leaves so it couldnt spread (due to there being no space), but due to a Minecraft bug the fire apeared to the client, but this was not on the server as when you walked in it you took no health. To fix it I made the lightning strike the block above the one which the player was looking at, which enabled fire to spread.

    This is my code, but you probally can improve it as my java is not very good and is a bit hacky (as you can see im adding 1 to the Y value):

    wgPlayerListener.java
    Code:
    Location loc = player.getTargetBlock(null, 600).getLocation();
    Block block = loc.getWorld().getBlockAt((int)loc.getX(), (int)loc.getY() + 1, (int)loc.getZ());
    player.getWorld().strikeLightning(block.getLocation());
    Hope this helps
    2rockon
     
  25. Offline

    DeaGato

    Could you add the abilities to hit mob with lightning?

    For expample:

    /weather strike xx
    xx > the number of mob showed on F3 mod.
     
  26. Offline

    FrozenBrain

    Thanks, definately trying this one out.

    Good idea, I'll add this too my todo list, too.
     
  27. Offline

    DeaGato

    And... you can also add the permission to control damage (on\off) caused by lightning?

    For example:

    default > No damage. (only to mobs)
    weather.strike.damage > You allowed to inflict damage with lighting.
     
  28. Offline

    John19800

    i keep getting a error this is what it is saying ( An internal error occured while attempting to perform this command)
     
  29. Offline

    FrozenBrain

    Then send me the errors that show up in your console and make sure you have CB build 709 or above.
     
  30. Offline

    Plague

Share This Page