Skip to content

Commit

Permalink
Add player.xp.to_next_level, fixes #330
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 9, 2013
1 parent ceab6ed commit 746ac3f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,14 @@ else if (attribute.startsWith("list.offline")) {

// Player is required to be online after this point...

// <--
// <player.xp.to_next_level> -> Element(number)
// returns the amount of experience to the next level.
// -->
if (attribute.startsWith("xp.to_next_level"))
return new Element(String.valueOf(getPlayerEntity().getExpToLevel()))
.getAttribute(attribute.fulfill(2));

// <--
// <player.xp.total> -> Element(number)
// returns the total amount of experience points.
Expand Down

0 comments on commit 746ac3f

Please sign in to comment.