[Tut] Using Prison-Rankup API

Discussion in 'Resources' started by ko47374737, Apr 23, 2014.

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

    ko47374737

    Hey this is a Tutorial on using Prison-Rankup API
    Code:java
    1.  
    2.  
    3. // Get a rank
    4. Rank rank = getRank("rank_name");
    5. // Get the price of a rank as a double
    6. double price = rank.getPrice();
    7. // Get the price as a String
    8. String priceString = rank.getPriceString();
    9.  
    10. // Get the PrisonRankup Player
    11. PRPlayer prp = getPlayer("playerName");
    12.  
    13. // Get Permission Rank (Taking from Vault directly)
    14. String s = prp.getPermissionRank();
    15.  
    16. // Get nextRank
    17. Rank nextRank = prp.getNextRank();
    18.  
    19. // Get UUID (Easy way as stored onJoin) (Does not contain dashes)
    20. String s = prp.getStringUUID();
    21.  
    22. // Get his current rank
    23. Rank rank = prp.getCurrentRank();
    24.  
    25. // Force the player to rankup, taking money when it is performed
    26. prp.rankup();
    27.  

    Now i will show you how you can use this in a scoreboard
    Code:java
    1. //Here is how to get how much money they need to for next rank
    2. double moneyToNextRank = economy.getBalance(Player) - rank.getPrice();
    3.  
    4.  
     
  2. Offline

    ko47374737

    Hope you enjoyed this!
     
  3. Offline

    LegitJava

    I don't mean to bash on your thread and I can understand it, of course. But, you labeled this is a tutorial and to me this seems like random code thrown into a thread without any background information on what the "Prison-Rankup API" actually is, and some links.
     
  4. Offline

    xTrollxDudex

    ko47374737
    I agree with LegitJava, but along with not including what the Ranks class even is, little information, and it looks a bit rashly thrown together.
     
    TigerHix likes this.
  5. Offline

    Cirno

  6. Offline

    BungeeTheCookie

    Enjoy what? xTrollxDudex LegitJava Did I miss something, or did this guy not provide a link? All I see is a bunch of random lines of code that have no explanation on what they do. I always hate it when I see resources like this. Do not post in the resource section unless you ACTUALLY have a LEGITIMATE resource people WANT to use.
     
    xTrollxDudex likes this.
  7. Offline

    Ultimate_n00b

    As well I don't see a getRank or getPlayer method.
     
  8. Offline

    mazentheamazin

    CeramicTitan likes this.
  9. Offline

    Ultimate_n00b

    Still no methods.
     
  10. Offline

    mazentheamazin

    Ultimate_n00b
    Try doing PrisonRankup.getRank("name") and PrisonRankup.getPlayer("playerName")
     
  11. Offline

    BungeeTheCookie

    mazentheamazin
    This is as bad as the @not_really_sethbling troll.
     
  12. Offline

    mazentheamazin

  13. Offline

    Ultimate_n00b

    =o I know really_sethbling (or just SethBling)
     
Thread Status:
Not open for further replies.

Share This Page