Creating a inventory with items from data stored in config

Discussion in 'Plugin Development' started by Jncwhite01, Dec 30, 2016.

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

    Jncwhite01

    Im creating a market plugin and have ran into an issue. I need to be able to create the inventories which players will add their items to, to be sold. When running the command to sell the item it will get the items id, amount, name, lore ect and store it in the config, however I was wondering how I would be able to take all these items stored in the config and create an inventory containing each item?

    Thank you for anyhelp, and if anyone would like to assist with making this plugin with me would be greatly appreciated as I have only recently got back into plugin development and am abit rusty.
     
  2. Offline

    Zombie_Striker

    @Jncwhite01
    Create a new itemstack. The material will be equal to the stored material's name (Use Material.matchMaterial(STRING) to turn a string to a material) and then apply all the other data to that itemstack.
     
  3. Offline

    Jncwhite01

    Thank you for the help, had been looking around have seen your name a few times seem like a very reputable member of the bukkit community. Will have a mess around with the code soon and see if i can get it working.
     
Thread Status:
Not open for further replies.

Share This Page