Solved Plugin help

Discussion in 'Plugin Development' started by Takedown, Jan 5, 2015.

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

    Takedown

    Hey guys. So im in need of a little help in creating custom inventories. So basically what I want to do is make it so when you run a command, it will save your previous inventory and open up the new one for that command.

    Example:
    run /sheep: saves default inventory, opens Sheep inventory
    run /cow: saves sheep inventory, opens the default inventory.

    Sorry if that isnt clear enough. basically what I want is multiple inventories with the previous ones saved.

    NOTE*** THIS IS NOT A PLUGIN REQUEST! I WANT TO BE SHOWN SOME CODE SO I CAN DO IT ON MY OWN.
     
  2. Invisible

    nverdier

    @Takedown The point of the Plugin Development section is to get help on code you already have. Nobody is going to write code for you, that you just claim as your own. If you really want someone else to write code for you, then go to the requests section.
     
  3. Offline

    Infuzion

    @Takedown
    An idea would be to use a hashmap<UUID, PlayerInventory> and to just swap the inventory using multiple variables. I haven't messed around to much with inventories so the probably is a better method to do this.
     
  4. Offline

    Takedown

    Yes, this section is to get help with code. I want to be shown how to start it off so I can continue on, I already said that I dont want someone to make me a plugin, I just need some help with creating it
     
  5. Invisible

    nverdier

    @Takedown So you want someone to write code for you? Here, I'll start you off:
    Code:
    public class Main extends JavaPlugin {
    
    public void onEnable() {
    //Completely useless as of now
    }
    
    public void onDisabe() {
    //Completely useless as of now
    }
    
    }
     
  6. Offline

    Takedown

    alls im asking for is some help
     
    Last edited by a moderator: Jan 5, 2015
  7. @Takedown He is helping you. Now no one will spoofeed you code, so for the inventory saving store in a hashmap. As was said before. Commands are also pretty self explanatory, on the certain one save or get the inventory.
     
    nverdier likes this.
  8. Offline

    Infuzion

    @Takedown
    If you don't know how to create a command, you may want to start here.
     
Thread Status:
Not open for further replies.

Share This Page