Filled Disco Armor

Discussion in 'Plugin Requests' started by AlwaysAllstar, Apr 13, 2020.

Thread Status:
Not open for further replies.
  1. Offline


    Plugin category: Fun

    Minecraft version: 1.14.4

    Suggested name: DiscoArmor

    What I want:
    I apologize as this seems like a ridiculous request since there are SO many out there. Unfortunately, most if not all of them are not updated or do not have all the requirements listed below.

    I need a plugin where a player can do /disco and it will equip them with leather armor changing random colors. Each piece of armor should change a different color and the armor should change once every 2 ticks. These are the things I need that I can't seem to find:

    1. The disco armor should not have any protection. It should be as if the player has no armor on. It's purely aesthetic.

    2. If the player has disco armor equipped on death, it will not drop. It will not disable when the player is tagged. The only time disco armor is disabled is if the player runs the command '/disco' or if the player dies. Again, it will disable on death, but it will not drop.

    3. When running '/disco' to enable, the player will be given full leather armor that cannot be taken off unless disabled by doing '/disco' again. If the player already has regular armor equipped when running '/disco' to enable, his armor will go to the first open spot(s) of his inventory, just like shift clicking items from a chest. If his inventory is full, it will drop his armor to the ground.

    3a. Be sure players won't be able to dupe the armor when trying to take it off, I ran into this problem with a plugin I was trying. If they try to take it off like normal armor, it should just "stick" to the armor slot and they won't be able to take it/copy it.

    3b. Each piece of the disco armor should be named "&dDisco Armor" when viewed/hovered in the inventory.

    3c. If an admin were to invsee a player with disco armor on, they shouldn't be able to take it either. Really disco armor is never going to exist unless it's being worn on a player.

    4. If a player already has disco armor enabled/disabled, it should deny them from enabling it again with a message or tell them it is disabled with a message.

    Messages are as follows (Includes color codes):

    -When equipping disco armor:
    "&dDisco&7&l>> &aYou enabled disco armor."

    -When disabling disco armor:
    "&dDisco&7&l>> &cYou disabled disco armor."

    -When already equipped:
    "&dDisco&7&l>> &cYou already have disco armor enabled."

    -When already disabled:
    "&dDisco&7&l>> &cYou already have disco armor disabled."

    -When a player does not have permission 'DiscoArmor.disco':
    "&4You do not have access to that command."

    Ideas for commands:
    /disco - Toggles disco armor on or off.

    Ideas for permissions:
    DiscoArmor.disco - Gives access to '/disco'.

    When I'd like it by: As soon as time allows. :)
  2. Offline

    johnny boy

    I really wanna attempt this - I'll try but no promises : )

    @AlwaysAllstar been on and off this all day - steady progress, im like 50% finished
    Last edited by a moderator: Apr 14, 2020
    AlwaysAllstar likes this.
  3. Offline


    Awesome @johnny_boy, thanks for doing this for me! Let me know when it's done so I can start testing. :)
  4. Offline


  5. Offline


    Hey, @scruffyboy13! Thanks for doing this for me, however I have many bugs:

    1. If possible, could you make it so no armor bars appear when a player has disco armor on? I'm not sure if this is even possible, but it would be awesome if you could.

    2. The armor is dropping when a player dies rather than disabling. What's happening right now is when a player dies, he drops armor, and then spawns with it again. Could you make it so if a player dies it doesn't drop the armor and he will respawn with it disabled?

    3. If a player has armor on, it just removes the armor when you do '/disco'. Then if you do the command again it enables, but the player's armor was deleted. Could you please make it so if you have armor you just have to do '/disco' once for it to enable and any armor the player is wearing will go to his inventory or on the ground if the inventory is full?

    3c. Admins are able to invsee players and take their armor.

    4. The message you get when you disable the armor doesn't appear. When you run '/disco' to disable the armor, it disables the armor but nothing happens in chat. Enabling armor works fine.

    5. Could you please change the message when someone doesn't have permission to '&4You do not have access to that command.'

    Note: A bug is that when a player gets disco armor from either a player dying with it and dropping it, or invseeing a player to take it from them, they get the armor and then is able to put it on. If they don't have permission for '/disco', then they put it on and can't take it off. This will be fixed though as long as admins can't take it with '/invsee' and player's don't drop it on death. As I said, disco armor should never be seen unless as an item on the ground or in an inventory. It should only be seen while being worn by a player with access to '/disco'

    Thanks again :), sorry for the long list of bugs..
  6. Offline


    @AlwaysAllstar See below for fixes and link to download:

    AFTER FIXING (I will upload to spigot when done:
    1. It is purely visual, player takes damage as if they didnt have armor on. I may be able to fix it with NMS (net.minecraft.server api) but i have no idea how to use it so i will update it for that in the future
    2. Was already working (Will not work with keepInventory), just say if u want it to
    3. Fixed (sorry, some last minute changes broke it)
    3b. Should now be fixed? Msg me if not
    4. Fixed. (Sorry, broken because of mistyping in config)
    5. Fixed (Now editable in config as well)

    Go to:
    Last edited: Apr 17, 2020
  7. Offline


    @scruffyboy13 I haven't tested it again because the folder and config doesn't load when I start the server. I get this in the console:
  8. Offline


    @AlwaysAllstar Ah, that is because when making the armor aesthetic only, i have to use nms to check if the player has absorption hearts. NMS can't be used for earlier versions and as I said before I don't know how to use it that well so for now I have updated the plugin so that aesthetic armor is only for 1.15
    Last edited: Apr 18, 2020
  9. Offline


    @scruffyboy13 now the plugin is acting as if it's not even installed. No folder or config is being generated, it is not shown in /plugins, /disco comes out as an unknown command, and nothing is generated about DiscoArmor in the console on server start up.
  10. Offline


    Are you sure? i've re-exported and uploaded a new jar but it was working for me... Is your jar in the right folder (plugins folder)
  11. Offline


    Hey, sorry I must've missed this in the console. I downloaded the two latest versions uploaded to spigot and both gave me this error:
  12. Offline


    Now fixed, I had to move an import to a different package. Working hopefully
  13. Offline


    Everything is working nearly perfect! The only issue I have is when a player does '/disco' while wearing armor with a full inventory:

    When a player does '/disco' with a full inventory and while wearing armor, it gives me the message 'An internal error occurred while attempting to perform this command.' It also drops a single piece of armor onto the ground without removing it from the inventory. This is a problem mostly because players would be able to fill their inventory and wear armor and repeatedly run '/disco' and it would dupe armor pieces.

    Edit: When a player has a full inventory and is wearing armor, it should drop his armor to the ground and enable disco armor.
  14. Offline


    That was one of the first things i made sure was working but havent tested it in the latest version so something may have stopped it from working. I will start work on it in an hour, should only take 10-20 mins

    EDIT: Fixed, uploading now.
    Last edited: Apr 19, 2020
  15. Offline


    Everything is working perfectly now! Thank you very much for making this for me, I really appreciate it. :)
  16. Offline


    I should be saying thanks for putting up with all of the bugs. Sorry about that im quite new to coding in java. I'm working on getting the aesthetic armor feature for 1.14. :)
    AlwaysAllstar likes this.
Thread Status:
Not open for further replies.

Share This Page