Dive Helmet

Dive Helmet

Give the ability for players to spend extended time underwater by using glass blocks as Dive Helmets.

Use:

Put stack of glass blocks on head just as if wearing a helmet. While wearing this "dive helmet". the player can take a breath underwater by entering sneak (pressing shift key normally). This breath will refill the air level and consume a glass block from the stack on head. Breaths can continue on until the blocks are used up. When stack of glass blocks gets low, it displays a warning, reminding to start heading for surface or load on some more glass blocks.

If a breath is not taken regularly, the character drowns as normal, but a breath can be still be taken while taking damage from drowning.

Installation:

Place DiveHelmet.jar in plugins folder and reload or restart. That's it, no commands, dependencies, configuration or permissions.

Notes:

This is my first public plugin. It is inspired by Party Hat (showed it possible to blocks on head) and Fishpeople ("breathing to by setting air to max) but is all original code. The concept is simple, but have not found it in any other plugin. I wanted a simple way for people to stay underwater for extended length of time.

The the single source file is embedded in the DiveHelmet.jar file.

Change Log:

1.0 Initial Public Release

1.1 First Update

  • Fixed Delay in equipping dive helmet
  • Now starts warning when down to 5 helmets (per carstorm's suggestion)

Known Bugs:

  • When placing glass blocks on head, slight delay for head and cursor items to update. (fixed in 1.1)
Considerations and Interactions with other Plugins:
  • If sneak is somehow disabled, this plugin will not operate.
  • A character will drown if does not breathe regularly, so doing thing like crafting, chatting or other activities that take ability to enter sneak mode, the player can drown.
  • Shift does not trigger sneak while typing in commands or chat, or while manipulating inventory. Careful while doing those tasks underwater.
  • Additional stacks of glass blocks can be placed on head while underwater, for longer under water voyages. Each stack of 64 glass if well timed will last 10-12 minutes,
  • Any plugin the alters the max air level of a player, using a dive helmet will only restore to normal max air level (300). If over normal max air level, will not consume a glass block nor increase air level

Future Plans:

  • If response to plugin is good, will look at adding localization on warning message when using last glass block on head.
  • look for way to improve visibility while underwater, may or may not be part of this plugin.

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    38440
  • Created
    Apr 8, 2012
  • Last Released File
    Never
  • Total Downloads
    2,911
  • License

Categories

Members

Recent Files