Solved Problem with my Plugin

Discussion in 'Spigot Plugin Development' started by matanm197, Jun 18, 2016.

  1. I am making KitPvP with kits shop and thats what I did:

    if the player buys the kit (Zombie) its set in the Kits.yml this:

    <PlayerID>
    Kits:
    Zombie: true

    That works good.

    but I made a Kit Selector too.

    And I dont know how to set the Kit Item in the kit selector only if the player bought the kit.

    Hope you will help me.
    Thanks.
     
  2. Only add the item to the inventory if Zombie is equal to true.
     
  3. Code (Text):
            if (SettingsManager.getKits().get(p.getUniqueId().toString() + ".Spider" == "true")){
                kit.setItem(22, spider);
            }
    Still not working its not set the kit in the kit selector if I buy it
     
  4. Your path is wrong based off your first post.

    The correct path should be: UUID.Kits.Spider
    You current path: UUID.Spider
     
  5. I thought on an idea and it works:

    Code (Text):
            if (SettingsManager.getKits().get(p.getUniqueId().toString() + ".Spider") != null){
                kit.setItem(24, spider);
            }
    Thanks!