Skip to content

Commit

Permalink
Merge pull request #263 from lcarilla/main
Browse files Browse the repository at this point in the history
Adds ex level to the player object

Reviewed by: @Velyn-N & @srmullaney
  • Loading branch information
DeathTrooperr authored Jan 6, 2024
2 parents da5ef1a + 586bc28 commit a773e7e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/io/servertap/api/v1/PlayerApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ private Player getPlayer(org.bukkit.entity.Player player) {

p.setExhaustion(player.getExhaustion());
p.setExp(player.getExp());
p.setExpLevel(player.getLevel());

p.setWhitelisted(player.isWhitelisted());
p.setBanned(player.isBanned());
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/io/servertap/api/v1/models/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public class Player {
@Expose
private Float exp = null;

@Expose
private Integer expLevel = null;

@Expose
private Boolean whitelisted = null;

Expand Down Expand Up @@ -78,6 +81,23 @@ public void setBalance(Double balance) {
this.balance = balance;
}

/**
* The Player's ExpLevel
*
* @return expLevel
**/
public Integer getExpLevel() {
return expLevel;
}

public void setExpLevel(Integer expLevel) {
this.expLevel = expLevel;
}

public Player expLevel(Integer expLevel) {
this.expLevel = expLevel;
return this;
}

/**
* The Player's UUID
Expand Down

0 comments on commit a773e7e

Please sign in to comment.