[MISC] Umbrella - Never get wet again! [1000]

Discussion in 'WIP and Development Status' started by Huw Huwson, Jul 24, 2011.


What should the default umbrella size be?

  1. 2

    1 vote(s)
  2. 3

    5 vote(s)
  3. 4

    1 vote(s)
  4. 5

    0 vote(s)
Thread Status:
Not open for further replies.
  1. Offline

    Huw Huwson

    Umbrella - Never get wet again:
    Version: v0.2

    Fed up of getting wet in the rain? Now you can stay dry with the use of one command!

    • Adds a glass block above your head to block rain
    • Activates using commands
    • Permissions support.
    Download The Plugin

    Source Code

    /umbrella - Toggles the umbrella on and off
    /umb - alias of /umbrella

    Permissions Nodes:
    umb.enable - Allows the player to use the umbrella command

    Todo (I'm new to development so could use a bit of help :)):
    • Configurable umbrella size.
    • Configurable umbrella block.

    • Version 0.3 (Coming soon)
      • A trail of glass will no longer appear above the player.
      • The glass block has been lifted up one to allow for correct jumping.
    • Version 0.2
      • Added permissions support.
      • First public release.
    • Version 0.1
      • Initial release of the plugin.
  2. Offline


    i really like the idea of heaving an umbrella following your players.
    I tested the plugin on my server and found out, that the creation on the umbrella works fine.
    But as the players walk around, they leave a line of glass where they have been, because the glass doesnt remove again.
    I would definetly recommend this plugin, if that bug is fixed.
    Another thing that i would change is the hight of the umbrella, i would lift the umbrella another block up, so that the players can jump properly.

  3. Offline

    Huw Huwson

    Hey killmano. I've found the bug which causes the trail and shall be fixing it soon, and I've also implimented measures to lift up the umbrella block one more. I'll try and bring out a fixed version within the next few hours.

    Thanks for your feedback :)

    - Huw
  4. Offline


    First of all, I nearly drowned because I fell in water, and couldn't get out (due to the umbrella). You should have this turn off or not work while the player is in the water (the player is already wet, after all). There should definitely be configurable umbrella material (not just class, maybe cloth for instance), umbrella radius, and umbrella height.
    For customizable material, you'd obviously want to disallow water, lava, etc...

    For customizable radius, I'd advise you to consider setting a cap on the radius, because this could major server lag, depending on the number of users, as well as the size of the umbrella. If you can figure out how to spawn circular umbrellas, that would be cool, but i think making it an odd numbered rectangle (1x1, 3,3, 5,5, etc.) where the very middle of the block matrix would be where the user stands.

    For the umbrella height, you should try to find a way to make the umbrella not form if you are already in a dry place (like indoors or under a tree). The reason for this is that you might have the height of say 10, but you are walking under an overhang 5 above you. If this check wasn't in place, you could have issues with the umbrella spawning up there anyways. An easy way to go about this is in your method for forming the umbrella at point x,y,z, you could check all the blocks between the player's head and the specified height, if there is a block anywhere in that area, then don't generate the umbrella block there. (NOTE: this may go away when you fix the problem with the glass remaining, so that when you try to get to the surface or when the player jumps, the umbrella moves too)

    On a final note, I don't know how you have the coding, but make sure that when you remove the glass, you are only removing the glass made by the umbrella. I can see a bug where you walk through a glass building and as you pass through it takes out the ceiling. Again, this might already have been obvious, but I just thought of that.

    Sorry for the long post. I hope this helps though.
  5. Offline

    Huw Huwson

    Hey dupsmckracken,

    In a later update, I shall be adding configuration for umbrella material and radius, but like you said, there will be limits and prohibited materials.
    Currently, there is coding to detect whether the space where the umbrella will be is empty, and I will be adding checks for blocks above this as well. I will also be adding detection to see if it is raining, so it cannot be used as a shield.
    And the removal of the umbrella blocks won't destroy nearby glass blocks, as it works by putting the original blocks into a database, then reverting back once the player has walked 5 blocks.

    Don't worry, I don't mind long posts, and this has helped me in making sure I don't miss anything out :)

    - Huw
Thread Status:
Not open for further replies.

Share This Page