Owned Kits List

Discussion in 'Plugin Development' started by fls1234, Dec 23, 2013.

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

    fls1234

    Hey Guys,

    I do really need help to solve this problem. I can't configure out how to list the kits ex:

    Owned Kits: Stomper, PvP, Archer
    UnOwned Kits: Switcher, Endermage

    Some one know how to do that? and it with permissions GoldKits.kit.<KitName>
     
  2. Offline

    pope_on_dope

    im guessing you want to store the owned kits in a config?
     
  3. Offline

    fls1234

    No i don't wont to save it thats why i have the perms, i need something to store it.
     
  4. Offline

    reider45

    Well.. you can do it the long way by like
    Code:java
    1. if(player.hasPermission("permission for stomper"){
    2. player.sendMessage("Stomper");
    3. }


    And do it that way, but It'd probably take a while
     
  5. Offline

    sgavster

    PHP:
    String[] kits = new String[] {StomperEndermageAnyOtherKit};
    String m "";
    for(
    String k kits) {
    if(
    p.hasPermission("GodKits.kits." k)) {
    ", ";
    p.sendMessage("Your kits: " m);
    } else {
    ", ";
    p.sendMessage("Kits you do not have: " m);
    }
    }
    Might work.
     
  6. Offline

    KaiPol

    Use a hashmap/permissions and then just do a while loop.
     
  7. Offline

    sgavster

  8. Offline

    reider45

    @sgvaster Oh you smart cookie you...
     
Thread Status:
Not open for further replies.

Share This Page