Filled Hats Menu

Discussion in 'Plugin Requests' started by LordOfPex, Nov 26, 2015.

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


    Plugin category: Utilities

    Suggested name: HCHats

    What I want: I'd simply would like a plugin that will let me oepn a gui and choose a head (I want to be able to set what names of heads will be in the gui) and when I click on a head, it will put it on the player's head, as a hat.
    Also, if there will be any messages in the plugin I would like them to be customizable.

    Ideas for commands:
    /Hats = Open the hats GUI.
    /Hat remove = Remove the current hat.
    /Hats add <SkullName> = Add a skull to the GUI.
    /Hatsreload = Reload the config file.

    Ideas for permissions:
    hchats.use = Permission to open the GUI.
    hchats.addhead = Permission to add a skull to the GUI.
    hchats.reload = Permission to reload the config file.

    When I'd like it by: Soon as possible.
  2. Offline


    Hi there!

    I wrote the plugin for you. It's slightly different from what you requested, but I will explain everything below.

    • /hats - Opens the hats GUI.
    • /hats add <name> - Allows people with permission to add heads to the GUI.
    • /hats remove <name> - Allows people with permission to remove heads from the GUI.
    • /hats clear - Removes the currently equipped hat from the player's helmet slot.
    • /hats reload - Reloads the configuration.
    • /hats help - Opens the help menu.

    • /hats - hchats.use (allowed for every user by default)
    • /hats add - hchats.addhead (allowed only for OPs by default)
    • /hats remove - hchats.removehead (allowed only for OPs by default)
    • /hats clear - hchats.clearhead (allowed for every user by default)
    • /hats reload - hchats.reload (allowed only for OPs by default)
    • /hats help - Doesn't need a permission.

    The command can be /hats, /hchats, /hc or /hat. Everything works the same, they're just aliases.

    Two things I've implemented which you haven't requested:

    1. If the player already has a helmet (diamond, leather etc.) on his head, the plugin will move that to the player's inventory. If there is no inventory space left, the custom skull will not get equipped.
    2. If equipped, the head can not be removed from the slot. You can still remove normal helmets, though.

    And of course, every message is changeable as you requested it. You can find the editable messages in the normal configuration file.


    Any questions? Still want me to add something? Just tell me!

  3. Offline


    Hey there,
    First of all, Thanks so much for the plugin, its awesome!
    A few things:
    1. When i perform /hc add or /hc remove without adding a name after it, it causing an internal error instead of showing the message.
    2. I got this problem as well:
    3. You said that if i have a head equipped already, if ill choose a new head from the GUI it will put the old head in the inventory of mine, and put the new head on. Right now it only equipping the new head on and removes the old head comletely instead of moving it to my inv. I dont know if its a problem or not, But i like that its getting removed completely, so Don't remove it pleaes xD

    4. Can you add the option to set the title of the GUI in the config as well? (Instead of just 'Heads') and the prefix of the messages? and also remove the lores from the heads?

    5. The plugin works amazing except for that. Thank you so much for it, it is much appreciated! :)
  4. Offline


    1. Sorry, my bad. It's fixed.
    2. Whoops, fixed it.
    3. If the player has a head from the GUI equipped, the plugin will just replace the head. If there's something else in the helmet slot, the original content will be moved to the inventory if there's space.
    4. GUI title and prefix done. As for the lore, I need that to determine wether a player skull is one from the GUI or not. I could also have some kind of indicator in the name, if that's fine.
    5. You're welcome! :)

    For now, the updated plugin is available under the link above. Regarding 4, just tell me if you want that changed and I'll happily change it.

  5. Offline


    I tried the new version, everything works great except for:

    1. I tried to use ChestCommands to make players click on an item in a menu, and that item click will perform /hats to open the hats menu, but when i click the item im getting this error:

    2. When I don't have any hat on me and I'm doing /hat clear it gives me this error:

    3. Some of the messages (Such as the GUI's title, config reload message) are not supporting color codes, and are being showed like that for example: '&aConfig reloaded' - with the actual color symbol.

    EDIT: It seems that now I can't even put any head on me. When I click a head in the GUI nothing happens.
  6. Offline


    1. I've attempted a fix, not sure if it actually works a I don't have ChestCommands installed on my test server. Please report back.
    2. Fixed.
    3. Fixed.
    4. (Edit): Fixed. That one was kinda my fault as I forgot to change a value if the name of the GUI has been changed in the config :p

    Please make sure to surround any messages in the config containing color codes with ' or else a part of the message will be missing upon reloading. Not sure why, but probably that's just how YAML is...

    Downloadlink updated :)

  7. Offline


    The new version works like a charm now! Thanks!
    Is it possible for you to add pages to the menu? Atm if im adding more heads after i reached the limit of the menu (6x9) slots, I can't add more heads. It will be awesome if I could have like a nether star in the last slot of the menu, which will lead me to a next page of heads (Also some kind of 'previous page' button too :p)

    Thanks again!
  8. Offline


    I'll try to implement that, but please give me a bit :)
    Done! I've tested it with 1000 playerheads, and it worked perfectly :D Link is updated.
    Last edited: Nov 28, 2015
  9. Offline


    Edit the title of this thread and mark as filled
  10. Offline


    It looks awesome!
    But when I press the nether stars I can just take them into my inventory, and not switching pages.
    Also when I press a head it just takes it into my inventory.

    I get this error:

    *Marked as Filled anyway*
  11. Offline


    Ah, got that fixed. I left some debugging code in there by accident. Should work now. Sorry ^-^
  12. Offline


    Tested the new version it works now great!

    Only 1 more thing (Sorry for bugging you D:): When I add more heads to the GUI, I must add at least around 10-12 heads to be able to open the next page. Means, if there are 3 pages, 2 of them a full, but the last page has only 9 heads in it, it won't open when I press the nether star.

    Rather than that, Thank you so much for it!
  13. Offline


    How many heads do you have set up in the GUI? I'd like to test that issue with that exact value.
  14. Offline


    Not sure how many I would like to set atm.. But th bug happens if i have less than 10-12 heads in one of the pages.
  15. Offline


    Thanks! Fixed it :)
  16. Offline


    Tested the new version, Works like a charm!
    You helped me a lot with it, Thank you so much, It is much appreciated! :)
  17. Offline


    You're welcome, mate! Always awesome to know I've helped someone out a ton ;)
Thread Status:
Not open for further replies.

Share This Page