Filled InventoryHotkeys

Discussion in 'Plugin Requests' started by adi0115, Sep 6, 2019.

  1. Offline

    adi0115

    Plugin category: Misc

    Minecraft version: 1.8

    Suggested name: InventoryHotkeys

    What I want: I'm looking for a plugin where you can set "hotkeys" inside of player's crafting slots. When player opens their inventory, the crafting slots will be set to items with names and lores that will execute a player or console command when clicked on. I am talking about these slots:
    [​IMG]

    I would like the items, names and lores and obviously the commands to be customizable inside of the config

    Ideas for commands: /ihk reload - reloads the config

    Ideas for permissions: none - reload commands can only be used by OPs to keep it simple

    When I'd like it by: This week
     
  2. Offline

    adi0115

  3. Offline

    adi0115

  4. Offline

    adi0115

  5. Offline

    adi0115

  6. Offline

    Maroka

    I've been giving it a shot today after I saw your thread yesterday. I couldn't get the 'result' slot to update, so I hope you're okay with just having the 4 other slots available. Anyway here's what I've come up with
    (New link further down the thread)

    The config should be relatively straightforward, but please feel free to ask if you need help or encounter any errors :)

    btw, It doesn't work with console commands, I kinda forgot that part, tell me if it's necessary.
     
    Last edited: Sep 12, 2019
    adi0115 likes this.
  7. Offline

    adi0115

    @Maroka Thanks for doing this :)

    I'm perfectly fine without the result slot, it would be nice for it to be setable aswell but I'm glad you were able to do it with the crafting slots. Regarding the console commands, I would appreciate if you could add them as well, I'm not going to need them right now but I will need them in the future. I will test the plugin right now and see if it works :) thanks for doing this request.

    Also wanted to ask, are you able to use color codes for stuff like the name and in the lores?
     
    Last edited: Sep 11, 2019
  8. Offline

    Maroka

    Yeah that’s possible. In the config surround the text you wish to give a color with quotations "" and type \xa7 followed by a number or letter of a color code, then have the text right after. As an example, §c is the color code for red, so It'd be "\xa7c..." the three dots represent the text of your choice. I could probably make it work with normal color codes, but this works without the need to fiddle with it.

    I've updated the plugin :>
    I fixed some flaws I noticed in the plugin, and now players can only use the reload command if they have the 'inventoryhotkeys.reload' permission (opped players can use it by default).

    You can also use normal color codes in the config now, just make sure the string is surrounded by single quotations like this 'string' with a color code it'd look like this '&4string' (dark red). It also works with console commands as you requested, just change 'IsConsoleCommand' in the config to true.

    Here it is:
    https://drive.google.com/open?id=1064yje-zgVfykj-otxcB8TwV8P72NRlX

    Hope it works as you wanted ^^

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 12, 2019
    adi0115 likes this.
  9. Offline

    adi0115

    @Maroka Thanks, I will give it a go!
     

Share This Page