Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git
Browse files Browse the repository at this point in the history
… into develop
  • Loading branch information
tastybento committed Jan 31, 2024
2 parents b255088 + 6bf12d5 commit c100fe0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ private void cleanUp(User target) {

// Reset the XP
if (getIWM().isOnLeaveResetXP(getWorld())) {
// Player collected XP (displayed)
target.getPlayer().setLevel(0);
target.getPlayer().setExp(0);
// Player total XP (not displayed)
target.getPlayer().setTotalExperience(0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ private void cleanPlayer(User user) {

// Reset the XP
if (getIWM().isOnJoinResetXP(getWorld())) {
// Player collected XP (displayed)
user.getPlayer().setLevel(0);
user.getPlayer().setExp(0);
// Player total XP (not displayed)
user.getPlayer().setTotalExperience(0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,10 @@ private void teleported(World world, User user, String name, boolean newIsland,

// Reset the XP
if (plugin.getIWM().isOnJoinResetXP(world)) {
// Player collected XP (displayed)
user.getPlayer().setLevel(0);
user.getPlayer().setExp(0);
// Player total XP (not displayed)
user.getPlayer().setTotalExperience(0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ public void cleanLeavingPlayer(World world, User target, boolean kicked, Island

// Reset the XP
if (plugin.getIWM().isOnLeaveResetXP(world) && target.isPlayer()) {
// Player collected XP (displayed)
target.getPlayer().setLevel(0);
target.getPlayer().setExp(0);
// Player total XP (not displayed)
target.getPlayer().setTotalExperience(0);
}
// Save player
Expand Down

0 comments on commit c100fe0

Please sign in to comment.