Best Method for Adding "Kits" To Players

Discussion in 'Plugin Development' started by MineCrypt, Jun 23, 2014.

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

    MineCrypt

    Alright, so I wanted to get the input of a few other developers before proceeding with this task.

    My goal/objective is to give players a set item or as I will call it kits. However, there is multiple kits and multiple levels within those kits. Now determining level or kits or players is not the hard part. But I want to know, what would be the best method for storing the kits and applying the kits to the player.

    I don't want to go and write out a thousand if statements and do player.addItem for a thousand different items. That would make the code extremely long as well as messy and not the best method. So what would be the best method for creating a list of multiple levels and kits, as well as giving the players those items.

    P.S The kits contain different armour which need to be auto-equipped. So creating a list and looping through it will not work if it's an armour piece because it needs to go into an armour slot.
     
  2. Start by posting what it is you have and we'll gladly help you condense it into cleaner smaller code. You're basically asking for us to give you code which shouldn't be the correct approach.
     
  3. Offline

    MineCrypt

    I don't have any code. I'm simply asking for pointers on the most efficient solution to store a list of items and apply them to a player. A list that includes armour and items as a different value.
     
  4. Offline

    _Filip

Thread Status:
Not open for further replies.

Share This Page