Update to BentoBox 1.8.0 API

This commit is contained in:
tastybento 2019-09-28 16:12:37 -07:00
parent 7b86ec860a
commit 6f53fe8a85
2 changed files with 40 additions and 0 deletions

View File

@ -336,6 +336,15 @@ public class AISettings implements WorldSettings {
@ConfigEntry(path = "island.reset.on-leave.ender-chest")
private boolean onLeaveResetEnderChest = false;
// Commands
@ConfigComment("List of commands to run when a player joins.")
@ConfigEntry(path = "island.commands.on-join")
private List<String> onJoinCommands = new ArrayList<>();
@ConfigComment("list of commands to run when a player leaves.")
@ConfigEntry(path = "island.commands.on-leave")
private List<String> onLeaveCommands = new ArrayList<>();
// Sethome
@ConfigEntry(path = "island.sethome.nether.allow")
private boolean allowSetHomeInNether = true;
@ -1285,5 +1294,31 @@ public class AISettings implements WorldSettings {
public void setDeathsResetOnNewIsland(boolean deathsResetOnNewIsland) {
this.deathsResetOnNewIsland = deathsResetOnNewIsland;
}
/**
* @return the onJoinCommands
*/
@Override
public List<String> getOnJoinCommands() {
return onJoinCommands;
}
/**
* @param onJoinCommands the onJoinCommands to set
*/
public void setOnJoinCommands(List<String> onJoinCommands) {
this.onJoinCommands = onJoinCommands;
}
/**
* @return the onLeaveCommands
*/
@Override
public List<String> getOnLeaveCommands() {
return onLeaveCommands;
}
/**
* @param onLeaveCommands the onLeaveCommands to set
*/
public void setOnLeaveCommands(List<String> onLeaveCommands) {
this.onLeaveCommands = onLeaveCommands;
}
}

View File

@ -269,6 +269,11 @@ island:
inventory: false
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
ender-chest: false
commands:
# List of commands to run when a player joins.
on-join: []
# List of commands to run when a player leaves.
on-leave: []
sethome:
nether:
allow: true