Create your own Kit (KitPvP)

Discussion in 'Plugin Requests' started by Xp10d3, Jun 19, 2020.

  1. Offline


    Plugin category: PvP

    Minecraft version: 1.8.8

    Suggested name: I have no clue :p

    What I want: This is pretty simple. So my KitPvP server will have voting, which we want to allow players to add to their own custom kits. How this will work is that players will be able to access the default kits but then also be able to use the command /addkit <kit_name> to add the item to their own custom kit. Then, upon doing /customkit <kit_name>, their inventory will be cleared and items they have added to the kit will be given. Players can also create kits using the command /createkit <kit_name>. If they try to create a kit with the same name an error will be sent. The amount of kits players can create should be configurable. By default 3 is a good number, but if players buy a rank they will be able to create more kits (permission based like pvp.createkit.<number>). There also should be a GUI to configure kits. For example, doing the command /kitgui will show a GUI with the kits they have as well as shared kits (explanation later). Clicking on a kit will open a GUI that shows an option to change the icon for the kit, the name of the kit, the items in the kit (so some can be removed), an option to delete the kit, and whether to make the kit sharable. If you turn on the option to share the kit, a message will be sent through chat to type the user's IGN. Upon doing so, IF the player is online a message will be shown on the other player's side asking whether to allow the kit to be shared. If you click [AGREE] you will be able to configure the shared kits in the /kitgui under "shared kits". In the GUI will show all the shared kits you have. Upon clicking one of the shared kits, you can either remove the kit and "unshare" it, or copy it to your own kits to configure later IF you have obtained the items beforehand. You can see the kits through /sharedkit <kit_name>. There also is an option to disable sharing kits so no one can share kits with you. You can do this using the command /sharekit <on/off>. There also should be a command (/kitblacklist) to blacklist certain items. For example, if you have the permission pvp.blacklist, and you do the command /kitblacklist, whatever item is in your hand will not be allowed to be added to a kit.

    Ideas for commands:
    /addkit <kit_name>: Adds item in hand to kit based on name.
    /customkit <kit_name>: Clears inventory and gives all items in the kit.
    /createkit <kit_name>: Creates a kit based on the name.
    /kitgui: Shows the kit GUI.
    /sharedkit <kit_name>: Clears inventory and gives all items in the shared kit.
    /sharekit <on/off>: Toggles sharing kits.
    /kitblacklist: Blacklists the item you are holding in your hand.

    Ideas for permissions:
    pvp.createkit.<number>: How many kits a player can create. By default it should be 3. Default: everyone
    pvp.addkit: Allows whether players can add items to a kit. Default: everyone
    pvp.createkit.allow: Allows whether players can create a kit. Default: everyone
    pvp.kitgui: Allows whether players can access the kit GUI. Default: everyone
    pvp.sharekit.kit: Allows whether players can share kits. Default: everyone
    pvp.sharekit.toggle: Allows whether players can toggle sharing kits. Default: OP (for ranks)
    pvp.blacklist: Allows blacklisting items. Default: OP

    When I'd like it by: As soon as possible (need to set up voting).
  2. Offline


    Hey, I would love to do this. I read through everything but I still don't have a deep understanding on how u want the GUI to look and work. If you can, please provide some more explanation and possibly a screenshot on how you want it to look. Also, how would you like to save this data? Do you have a MySQL database? If not I'll be using a flat file (config file). Last question, can you give me the maximum number of kits to create.

    Edit: Will the kits also save the armour contents?
    Last edited: Jun 20, 2020
  3. Offline


    @Zxoir Alright. So for the GUI, there is one that contains all the kits you yourself have created. You can access this through /kitgui. In that GUI, all kits you have created through /createkit will be shown there with their names. Clicking on a kit will show all the items used in that kit as well as when it was created, whether it has been shared with any other players, and if it has been shared with other players how many players it has been shared with. The item that displays whether it has been shared with other players can be clicked on to open another GUI with all players it has been shared with. You can unshare the kit by clicking on their name to remove them from the kit. There is another part of the GUI that is called "Shared Kits". Shared Kits are kits players have shared with you. Clicking on the Shared Kits area, you can view kits based on their names but you cannot access the kit itself without obtaining the item beforehand. For example, if there was a kit that contained a Diamond Sword with Sharpness II, you can't use that kit unless you have obtained a Diamond Sword before (enchantments don't matter). Clicking on a Shared Kit, you can see the items that are in there as well as who made it, the date it was made, and how many people it has been shared with. There should also be an item that allows you to use the kit if you have obtained all items previously.
    And yes, the kits will save armor contents.
    Sorry if this is confusing. If you have any more questions let me know :)
  4. Offline


    Ey @Zxoir . You doing this plugin? If so any progress?
  5. Offline


    Hey! Sorry, been inactive for a while. Yea I am working on this. I haven't done much yet.

    I understand how the GUI works, but I'm confused on how you want the shared kits to work. Can you rephrase it please.
    Xp10d3 likes this.
  6. Offline


    Alright; thanks for letting me know :) Sure. Basically, let's say that Player1 created a kit containing a diamond sword with fire aspect 1, leather armor with thorns 5, an enchanted golden apple, and a golden apple. He can then share a kit with Player2. After creating a kit, Player1 will have to use the command /kitgui. In the GUI, his created kit will be shown there along with any kits that have been shared with him. Let's say he clicks on the kit containing the fire aspect sword. There will be multiple options to change the kit that I described already, but let's say Player1 clicks on the "Share Kit" option. It will close the GUI and ask Player1 to type the player's IGN in chat in order to share the kit with another player. A confirmation will appear in chat on Player2's side asking whether they want to accept the kit from Player1's side. The message will look something like this:

    Player1 wants to share kit "Kit Name".
    [Agree] [Ignore]

    Clicking on [Agree] will add the kit to Player2's kits. Clicking on [Ignore] will cancel sharing the kit. Let's say Player2 clicks [Agree]. Player2 can now see the kit by doing /kitgui. It will appear under "Shared Kits" in the GUI and Player2 can now click on it. Doing so will show a few options including the option to remove the kit entirely (it won't show in the GUI anymore), view the kit's contents (not edit it. Note that an user can also see the contents of the kit using /sharedkit <kit_name>), or copy the kit to Player2's personal kits to configure it later. However, if Player2 hasn't obtained a diamond sword (as that is part of the shared kit), he cannot copy the kit. He also won't be able to use the kit if he hasn't obtained any of the contents in the kit. For example, there is leather pants, an enchanted golden apple, and an enchanted diamond sword. If Player2 hasn't obtained all of the contents (leather pants, enchanted golden apples, or a diamond sword) then they can't use the kit or copy it. Anyways, that's the main concept of sharing kits. There are a few more features including the ability to turn off sharing kits entirely using the command /sharekit off. This means that no one can share kits with you.

    Hope this helps :)
  7. Offline


    Hey any updates so far @Zxoir ?
  8. Offline


  9. Offline


  10. Offline


    Bumppety bump. If anyone wants to take over this feel free to. Don't know whether @Zxoir is interested in this anymore...

Share This Page