Inactive [MECH] FishPeople v1.7.1 - Gold Helmet = Infinite Air While Swimming [1.2.3-R0.2]

Discussion in 'Inactive/Unsupported Plugins' started by Richard Robertson, Mar 4, 2011.

  1. FishPeople - Infinite air underwater:
    Version: v1.7.1

    This plugin is for servers that focus more on creative rather than survival. It makes building underwater infinitely safer because you no longer drown. The only downside is that people who are underwater can no longer speak. Instead there is a comical [glub glub glub] accompanying any underwater chat messages.

    • Infinite air while wearing gold helmet (or configured item)
    • Garbled underwater chat (if configured)
    • Permissions support!
    • Now swim in lava! (if configured)
    • Supports item names as well as ID numbers
    Also available here

    File located at /plugins/FishPeople/config.yml
    This file will be created if it does not exist and will contain these default settings.
    These default settings will also be used if a value is not set.

    • fishpeople.infiniteair
      Gives the player infinite air while wearing the helmet (overrides extended air)
    • fishpeople.extendedair
      Gives the player more air while wearing the helmet
    • fishpeople.cantalkunderwater
      Lets the player talk underwater and bypass the filter
    • fishpeople.invinciblehelmet
      Prevents the player's helmet from taking damage if damage is configured
    • fishpeople.lavasafe
      Allows the player to swim in lava (no burning damage)
    • fishpeople.config
      Allows the player to call /fishpeople
    • fishpeople.*
      Emulates having infinite air, invincible helmet, lava safe, config, and chat filter bypass

    • /fishpeople help
      Lists all commands available
    • /fishpeople help <command>
      Gives help on the command given
    • /fishpeople reload
      Reloads the configuration from the hard disk
    • /fishpeople enable
      Enables the infinite air and chat filter
    • /fishpeople disable
      Disables the infinite air and chat filter
    • /fishpeople helmet-type <id>
      Sets the item id for the head item that gives infinite air
    • /fishpeople chat-filter true
      Replaces chat messages when players are underwater
    • /fishpeople chat-filter false
      Allows users to talk normally underwater
    • /fishpeople underwater-chat <message>
      Sets the message that appears when someone talks underwater
    • /fishpeople air-multiplier <number>
      Extends the amount of air players have
      "/fishpeople air-multiplier 2.5" would mean they have two and a half times as much air
    • /fishpeople helmet-damage <amount>
      Every second a player is underwater and wearing the special helmet it will take the damage specified
    • /fishpeople helmet-replacement <id>
      Sets the item id for the head item that will be set when a helmet is destroyed
    • /fishpeople low-air-warning <seconds>
      When a player has only <seconds> left of air, they get a warning
      Set negative to not give a warning
    • /fishpeople low-air-message <message>
      Sets the message to be displayed when a person hits the low-air-warning mark

    Version 1.7.1
    • Fixed null pointer exception occurring on Minecraft 1.2 and higher
    Version 1.7
    • Removed defunct Permissions 3 support
    • Fixed helmet damage
    • Updated to match Bukkit's new event handling system.
    Version 1.6
    • Compiled for Permissions 3 support
    Version 1.5
    • Bug fixes: falling damage while in lava, and race condition when loading Permissions plugin
    Version 1.4
    • Bug fix: replaced player.getLocation() with player.getEyeLocation() so effects only happen when the player's head is underwater
    Version 1.3
    • Changed event registration to match Craftbukkit 600+
    Version 1.2
    • Permissions support
    • Can have extended air instead of only infinite air
    • Can configure a message to appear warning those with extended air that they will drown soon (since the client bubbles are wrong)
    • Can configure helmet to take damage while being worn
    • Can replace the helmet when something else when it is "destroyed" from being used. You could use this to say, turn your gold helmet to a leather helmet when the magic runs out
    • Added the ability to swim in lava
    • Fixed problem where some servers would not restore air
    Version 1.1
    • Helmet type configurable
    • Underwater chat message configurable
    • Underwater chat message disable-able
    • Can limit to ops only
    • Can adjust all options at runtime
    Version 1.0
    • Initial release

    Known issues:
    • Client side remaining air bubbles still disappear; I cannot do anything about this.
  2. Offline


    Nice! I'll use this as a race on my server if you make it so that the fish people can swim faster (is that possible?).
    And also please make it so that fishpeople (if given a permission node) can breathe with no helmet.
  3. Actually, that won't even compile. I appreciate the attempt but I'm already working on it and have that much fixed. I'm working on moving over to Superperms now.

    One of the biggest issues in your code is that you tried to use helmet.getMaxDurability() but helmet was an ItemStack, not a Material.

    No, I can't make you swim faster. There's no easy way to speed up the player without using hacky type code.

    You can already set the required helmet to "air" and that works for now. I'm working on a new system that will let you specify different sets of material for different people/permission groups and what they do. Unfortunately it's pretty messy and not worth releasing yet.

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


    Oh thanks, I really should learn the specifics of bukkit programming. I look forward to your update so I can use this plugin on my server ^_^

    Any chance of including a setting for how fast the item takes damage? (as opposed to every second)
  5. No, the speed would be too difficult to change because the damage is synced with the effect.

    If you have a very strong reason to need it changed, I know a way I could get it to work, but it would require a near rewrite of the code.
  6. Offline


    The damage to the item cannot be lower than 1. This means a Gold Helmet could only last up to 68 seconds and a Leather Helmet could only last up to 34. If adding an option to slow down the rate of damage would require more effort than it's worth, you could add an option to override the item's max durability with the defined number. As long as the setting is greater than 0, it'll be used as the point the item breaks instead. This option gives control over exactly how long the item will last for this purpose.
  7. Item max durability is hard coded. Also if I were to mess with it somehow, then everyone's items would be modified, even if there were damage via other means.
  8. Offline


    Based on what I saw in your code, your having it check its current durability against its max durability. If it has been reached, you replace the item with air (or the burnout item if configured). Set a variable to the setting I described unless that setting is 0, in which case set it to the items max durability. Then replace the item when the variable is met instead of max durability. We've already determined that the item can take more damage that it has durability without breaking (unless it takes damage by other means), so this would work fine.
  9. I'd be willing to let you run to an unnatural amount of damage.
  10. Offline


    You are fantastic. I recommend adding a donation button to your plugin page.
  11. That was an easy request.
  12. Offline


    I like to show support to people that make me happy ^_^
  13. Much appreciated.

    I also think I came up with a way to combine the "over-damaged" items and multiple worn items into one new configurable thing that doesn't look horrible.

    # this is the regular gold helmet for infinite air
    # to let a user use this, they need fishpeople.suits.standard permission to use this suit
            helmet: gold_helmet
    # "infinite" or a number for an air extender
            gives: infinite
    # these can be named whatever you want, they just become the permission nodes for fishpeople.suits.[whatever]
    # no helmet this time, but they need gold boots
            shoes: gold_boots
    # the boots take 1 damage every second
    # the boots are allowed to take 9000 damage before being destroyed by FishPeople
            shoe-damage: 1
            shoe-damage-max: 9000
    # the boots give 10 times as much air
            gives: 10
    What do you guys think?

    Here's the example config without the comments in the way so you can see the layout better.

            helmet: gold_helmet
            gives: infinite
            shoes: gold_boots
            shoe-damage: 1
            shoe-damage-max: 9000
            gives: 10
  14. Offline


    Oh okay. When that comes out I guess I could make it so that the people who aren't fishpeople have to have a sponge on their head. Which is impossible without plugins that let you place blocks on your head :p Would that work?
  15. Offline


    In this way, could any armour item be configured? Such as
            helmet: leather_helmet
            helmet-damage: 1
            helmet-damage-max: 300
            gives: infinite
            shirt: diamond_chestplate
            shirt-damage: 1
            shirt-damage-max: 0
            gives: 5
    This would make leather helmet give infinite air for up to 5 minutes before breaking and diamond chestplate would give 5 times as much air, lasting a total of 6.4 minutes before breaking (using default durability).

    Do I understand this correctly?
  16. Yes, with one exception. If you want default max durability, don't even include the maximum damage configuration.

    Also, you can include multiple pieces to make a complete set like this. (Also keep in mind that the names may change again before I release this)

            head: gold_helmet
            chest: gold_chestplate
            leg: gold_leggings
            foot: gold_boots
            hand: gold_block
            gives: infinite
    Sponges don't stop water in Alpha or Beta. They only did that in Classic and Indev.

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


    I know. I mean if I make them have sponges on their head it would be IMPOSSIBLE for them to use the plugin.
  18. I suppose. Or you could just not give them the permission node that is needed to access the plugin.

    It would be silly seeing everyone wearing sponges.
  19. Offline


    OH! I didn't realize there was a permission node. The aim of the sponges was to be so that no one could access the plugin unless I made them use air as their helmet. So everyone else would have sponges to make it impossible to get the helmet in the sense that you can not get them without spawning and also you can't put blocks on your head, so it would be double-guaranteed.
  20. Offline


    How's the update coming along? My players are extremely anxious to get real use of our ocean world XD
  21. Well I've got some awesome news, and some awesomer news. I also have some less interesting news and some bad news.

    Awesome: Got the new suit layout code done. And working.

    Awesomer: Replacing the old system of checking every loop whether or not you are wearing the required suit with a new system that watches the inventory for changes and then gives/takes what it needs to.

    Less interesting: I'm having to write the packet monitoring code for the inventory myself. I'm going submit the code to Spout (you'll need Spout for this to work right).

    Bad: I'm still learning how to use Git, and when trying to set up my forked repository, I accidentally caused Git to overwrite my changes and lost quite a bit of work.

    Sorry for the delay, but of course I've got my real life job and all that stuff mixed with screwing up my code.
  22. Offline


    The only downside to Spout is that it auto-updates by default and they don't offer older downloads. In the case where someone who hasn't updated to the latest version of Bukkit (to wait for their plugins to catch up or something), downloading your plugin or leaving auto-update on means getting the latest version of Spout. I was bitten by this once and had to avoid plugins that required Spout/BukkitContrib until I was able to get the latest Bukkit.
  23. Offline


    Will there still be just a basic version like there is now where we don't need spout and wearing a gold helmet simply stops us drowning/dying in lava?
  24. I can keep the 1.6 build around if you prefer to stay with it. Would that be sufficient?

    Actually. I might be able to make a single plugin that degrades if Spout is not included in the server. I'll see what I can do and get back to you.

    Well I would suggest just properly configuring all your plugins before starting the server. If you know it autoupdates, turn it off before you run the server.

    That's part of downloading a new plugin, the configuration.

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


    Whichever is easiest for you. Being able to simply say not to use spout and thus use only the basic features would be great if possible. I only ask because we try not to use a lot of plugins, our server is pretty much a free to play creative world so we try to keep it as simple as it can be whilst still having the options people need.
  26. Offline


    Nifty, but kind of subset of firelord.

    How about treating leather boots as fins and increase the swimming speed of the wearer (permissionable).
  27. On the first point, my plugin was out several days before FireLord, and I've never heard of it until just now. Mine is designed for working in water (optionally lava) rather than giving a use to golden items. The next version I am currently working on isn't limited to just helmets by the way. I've just had a heavy work schedule (real life job) and haven't been able to finish version 2 of FishPeople. Then throw in the new BukkitDev thing that I've got to figure out how to migrate.

    On the second point, trying to increase movement speed of anything is a hack. There is no easy way to do it because most of that happens on the client end, not the server end.
  28. Offline


    Rich.. thanks for the reply.

    I didn't mean to imply that you snagged the source. Just thinking in terms of the number of plugins running and if I can do the same thing with firelord that I'm already using for a Nether world, then maybe I don't need this.

    I'm curious as to how the flying mods adjust the flying speed if you can't do that with walking/swimming.. Maybe its really a noclip hack of some kind? I did find the Speedwalk plugin which is kind of nifty, but can't seem to make it work in water for some reason (it's a very annoying plugin to try to configure). It's all server side, but presumably the hack you're talking about?

    Thanks -- I am using fishpeople right now, btw. I really just use this for a server I setup for my kids. Each kid owns their own world, and they are elementally based. May daughter has the skylands world and only her toon can fly. One of my sons has a very oceanic world and while everyone else can use the helmet to extend breathing by 3x normal, only that one toon has unlimited, so it's really nice that way. Second son has the firelord plugin enabled only for his toon in his nether world. The underwater breathing is cool and all, but fast swimming would add just that extra feature in an elementally-based mutltiverse.


    And, alternatively or additionally, water walking would be cool.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 11, 2016
  29. I'll see what I can do. I might be able to pull it off using the new Spout stuff I'm looking in to right now.

    Good news. Spout makes it super easy to increase swimming speed now. Expect that feature in the next edition.
  30. Offline


  31. Offline


Share This Page