[REQ] Storage Xp

Discussion in 'Archived: Plugin Requests' started by matix931, Nov 24, 2011.

  1. Offline

    matix931

    Simple plugin with commands: storage, get and check (xp), but storage only if u have more than 200 xp (or in config value).
     
  2. Offline

    gasag96

    I had exactly the same idea and wanted to send you.
    You should also with the exp can be.

    Sry 4 bad english
     
  3. This is pretty simple to program. Just create a hashmap with player name and xp value. Any beginning plugin developer could get this done!

    Sorry, but I don't have time for this...
     
  4. Offline

    -_Husky_-

    I can do a part of it, but not the Hashmap
     
  5. Code:
    // Initialise HashMap
    Map<String, Integer> storage = new HashMap<String, Integer>();
    // Add to hashmap
    storage.put("PlayerName", amount);
    
    // Check if player has amount set
    if(storage.containsKey("PlayerName")) {
        amount = storage.get("PlayerName");
    } else {
        amount = 0;
    }
    If you can get the hang of hashmaps a world of possibilities opens up to you :)
     
  6. Offline

    -_Husky_-

    making it now
     

Share This Page