Solved How do i check if a inventory exists?

Discussion in 'Plugin Development' started by Gonmarte, Jun 29, 2016.

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

    Gonmarte

    Lets say i have a inventory called "Inv", with 54 slots, How do i check if this inventory exists?
     
  2. Online

    timtower Administrator Administrator Moderator

  3. Offline

    Gonmarte

    I dont know if it exists. When a player clicks on a paper, on a inventory that i created, it will create a inventory with the player name. I need to check if the inventory doesnt exist.
     
  4. Online

    timtower Administrator Administrator Moderator

    Now you are getting clear.
    Store the inventories in a map of some sort.
    UUID, Inventory
    If you want to know if it exits: just check if the UUID is in the map.
     
    Gonmarte likes this.
  5. Offline

    Gonmarte

    I dont know why i didnt think on that.
    Thanks ;)
     
    timtower likes this.
Thread Status:
Not open for further replies.

Share This Page