DiveCraft
DiveCraft
Introduction
This plugin allows you to use a helmet for extended underwater exploration. Once your air bar is empty while wearing a helmet, the helmet consumes fuel to refill the air bar and in absence of fuel, you start drowning. If there is fuel but not enough for a full refill, a partial refill is done. You can extend your base lung capacity by wearing a chestplate. Depending on the kind of chestplate, a different amount of capacity is added.
Fuel can be any item, you just have to have it on you. Depending on the helmet, a different fuel consumption can be configured (helmets = anything you can put on your head and that you configure to be a valid diving helmet).
This is intended for servers where an extended submarine experience is wanted but where unlimited diving capabilities and client mods are undesirable.
Features
- Being able to do extended underwater exploration
- Configurable fuel item
- Configurable dive-enabled helmets
- Configurable fuel consumption
- Configurable dive-enabled chestplates for additional air capacity
- Configurable base lung capacity
- No client mod necessary
- Permission nodes for enabling/disabling diving equipment
Default behaviour
Uses sugar cane for fuel. Pumpkins are the most fuel-efficient (but the view stinks) and the worst helmet is a Leather Cap. These are configured in the configuration file. The default permission setting is to allow usage of DiveCraft features. The base lung capacity is 10.5 seconds and each helmet adds a number of seconds to this. Leather chestplate adds 1 second, diamond and chain chestplates add 4 seconds.
Download
DiveCraft v4 (Bukkit 1.3.1-R1.0 compatible)
Possible future work
- Multiple fuel types with different energetic values
- Flippers for faster water travel
This plugin suits my needs nicely, but there's a bug on line 128 of DiveCraftEventListener.java. The code casts to a Player, but the getHolder() inventory method returns InventoryHolder, of which Player is one of many possible implementations. This causes an exception in the console when, for instance, inventory from a chest is clicked. Not good.
I suggest a single line of code be inserted before line 128:
if (! (inventory.getHolder() instanceof Player)) return;
That should fix it.
Hi, i get this error sometimes when someone dies, i don't know why, just though you might want the error.
I use version 4.
http://pastebin.com/T2Ub5Jt6
I also get this error sometimes:
http://pastebin.com/Lp11wpg5
@Cecelo126
if it's only an extended air supply you want, you can change the configuration to not have any helmets and play around with the capacities of the tanks (1 second of air for every 20 capacity). Because of the way I implemented this in the plugin you may see a lot of air indicators in your clients when you set it larger than 300 (15 seconds).
Refilling the tanks when resurfacing would be awesome but it would require a check for every movement of the player, even when on land. Needless to say, something to be avoided.
Realism isn't the goal of this plugin. I wanted to make the player do some amount of work for the benefit of being able to be under water for extended periods of time (no free lunch). Not that I won't be adding features to make it more realistic but they will probably be added because of a useful functionality rather than being realistic.
Hi,
It would be nice if there are imaginary diving cylinders and can be set how much time you can stay underwater before returning in an air space to refill them, instead of loosing fuel.
e.p.: I can breath underwater for 5 minutes and then I'll drown if I don't exit from water, after that I can refill my diving cylinders in at least 5x5x5 air space.
In this way this plugin could be more realistic than using fuel...
Thanks for reading
Cecio
@nedercraft
Multi-world should also work, provided each world has a separate permission set (as per GroupManager)
@papand13
With which version of DiveCraft were you getting this error? What was happening when this error occured? Can you provide steps so I can reproduce it?
I get this error alot:
Please see if you can fix it :S I don't know what it does, but it might be compatibility issues with the newest bukkit?
I like this alot
Any progress?:)
@wimthys
Sweet :).
@nedercraft I'm glad you like it! I'll look into the whole multiworld and permissions thing when I've got the time! (this is my first plugin ever, so it'll be a lot of looking :P)
Hey Wimthys,
I LOVE this plugin already,just one thing, could you add Multiworld support?
edit: oh and also Permissions support? Cheers,
/AnarkhiA