Skip to content

Commit

Permalink
Update to latest BentoBox API
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Oct 13, 2019
1 parent 6f1ee45 commit e65041e
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
114 changes: 114 additions & 0 deletions src/main/java/world/bentobox/skygrid/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,18 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "area.reset.on-join.inventory")
private boolean onJoinResetInventory = false;

@ConfigComment("Reset health - if true, the player's health will be reset.")
@ConfigEntry(path = "island.reset.on-join.health")
private boolean onJoinResetHealth = true;

@ConfigComment("Reset hunger - if true, the player's hunger will be reset.")
@ConfigEntry(path = "island.reset.on-join.hunger")
private boolean onJoinResetHunger = true;

@ConfigComment("Reset experience points - if true, the player's experience will be reset.")
@ConfigEntry(path = "island.reset.on-join.exp")
private boolean onJoinResetXP = false;

@ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
@ConfigEntry(path = "area.reset.on-join.ender-chest")
private boolean onJoinResetEnderChest = false;
Expand All @@ -234,6 +246,18 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "area.reset.on-leave.inventory")
private boolean onLeaveResetInventory = false;

@ConfigComment("Reset health - if true, the player's health will be reset.")
@ConfigEntry(path = "island.reset.on-leave.health")
private boolean onLeaveResetHealth = false;

@ConfigComment("Reset hunger - if true, the player's hunger will be reset.")
@ConfigEntry(path = "island.reset.on-leave.hunger")
private boolean onLeaveResetHunger = false;

@ConfigComment("Reset experience - if true, the player's experience will be reset.")
@ConfigEntry(path = "island.reset.on-leave.exp")
private boolean onLeaveResetXP = false;

@ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
@ConfigEntry(path = "area.reset.on-leave.ender-chest")
private boolean onLeaveResetEnderChest = false;
Expand Down Expand Up @@ -1184,4 +1208,94 @@ public List<String> getOnLeaveCommands() {
public void setOnLeaveCommands(List<String> onLeaveCommands) {
this.onLeaveCommands = onLeaveCommands;
}

/**
* @return the onJoinResetHealth
*/
@Override
public boolean isOnJoinResetHealth() {
return onJoinResetHealth;
}

/**
* @param onJoinResetHealth the onJoinResetHealth to set
*/
public void setOnJoinResetHealth(boolean onJoinResetHealth) {
this.onJoinResetHealth = onJoinResetHealth;
}

/**
* @return the onJoinResetHunger
*/
@Override
public boolean isOnJoinResetHunger() {
return onJoinResetHunger;
}

/**
* @param onJoinResetHunger the onJoinResetHunger to set
*/
public void setOnJoinResetHunger(boolean onJoinResetHunger) {
this.onJoinResetHunger = onJoinResetHunger;
}

/**
* @return the onJoinResetXP
*/
@Override
public boolean isOnJoinResetXP() {
return onJoinResetXP;
}

/**
* @param onJoinResetXP the onJoinResetXP to set
*/
public void setOnJoinResetXP(boolean onJoinResetXP) {
this.onJoinResetXP = onJoinResetXP;
}

/**
* @return the onLeaveResetHealth
*/
@Override
public boolean isOnLeaveResetHealth() {
return onLeaveResetHealth;
}

/**
* @param onLeaveResetHealth the onLeaveResetHealth to set
*/
public void setOnLeaveResetHealth(boolean onLeaveResetHealth) {
this.onLeaveResetHealth = onLeaveResetHealth;
}

/**
* @return the onLeaveResetHunger
*/
@Override
public boolean isOnLeaveResetHunger() {
return onLeaveResetHunger;
}

/**
* @param onLeaveResetHunger the onLeaveResetHunger to set
*/
public void setOnLeaveResetHunger(boolean onLeaveResetHunger) {
this.onLeaveResetHunger = onLeaveResetHunger;
}

/**
* @return the onLeaveResetXP
*/
@Override
public boolean isOnLeaveResetXP() {
return onLeaveResetXP;
}

/**
* @param onLeaveResetXP the onLeaveResetXP to set
*/
public void setOnLeaveResetXP(boolean onLeaveResetXP) {
this.onLeaveResetXP = onLeaveResetXP;
}
}
12 changes: 12 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,12 @@ area:
# Note: if you have MultiInv running or a similar inventory control plugin, that
# plugin may still reset the inventory when the world changes.
inventory: false
# Reset health - if true, the player's health will be reset.
health: true
# Reset hunger - if true, the player's hunger will be reset.
hunger: true
# Reset experience points - if true, the player's experience will be reset.
exp: false
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
ender-chest: false
on-leave:
Expand All @@ -843,6 +849,12 @@ area:
# Note: if you have MultiInv running or a similar inventory control plugin, that
# plugin may still reset the inventory when the world changes.
inventory: false
# Reset health - if true, the player's health will be reset.
health: false
# Reset hunger - if true, the player's hunger will be reset.
hunger: false
# Reset experience - if true, the player's experience will be reset.
exp: false
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
ender-chest: false
commands:
Expand Down

0 comments on commit e65041e

Please sign in to comment.