Updated to latest 1.8.0 BentoBox API

This commit is contained in:
tastybento 2019-09-28 16:10:36 -07:00
parent 518a66bbde
commit 0c669de9b0
2 changed files with 54 additions and 8 deletions

View File

@ -169,12 +169,12 @@ public class Settings implements WorldSettings {
@ConfigComment("These are the default protection settings for new islands.") @ConfigComment("These are the default protection settings for new islands.")
@ConfigComment("The value is the minimum island rank required allowed to do the action") @ConfigComment("The value is the minimum island rank required allowed to do the action")
@ConfigComment("Ranks are the following:") @ConfigComment("Ranks are the following:")
@ConfigComment(" VISITOR = 0") @ConfigComment(" VISITOR = 0")
@ConfigComment(" COOP = 200") @ConfigComment(" COOP = 200")
@ConfigComment(" TRUSTED = 400") @ConfigComment(" TRUSTED = 400")
@ConfigComment(" MEMBER = 500") @ConfigComment(" MEMBER = 500")
@ConfigComment(" SUB-OWNER = 900") @ConfigComment(" SUB-OWNER = 900")
@ConfigComment(" OWNER = 1000") @ConfigComment(" OWNER = 1000")
@ConfigEntry(path = "world.default-island-flags") @ConfigEntry(path = "world.default-island-flags")
@Adapter(FlagSerializer.class) @Adapter(FlagSerializer.class)
private Map<Flag, Integer> defaultIslandFlags = new HashMap<>(); private Map<Flag, Integer> defaultIslandFlags = new HashMap<>();
@ -226,7 +226,7 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "island.reset.kicked-keep-inventory") @ConfigEntry(path = "island.reset.kicked-keep-inventory")
private boolean kickedKeepInventory = false; private boolean kickedKeepInventory = false;
@ConfigComment("What the plugin should reset when the player joins or creates an island") @ConfigComment("What the addon should reset when the player joins or creates an island")
@ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money") @ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money")
@ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds") @ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds")
@ConfigComment("make sure your economy handles multi-worlds too.") @ConfigComment("make sure your economy handles multi-worlds too.")
@ -260,6 +260,15 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "island.reset.on-leave.ender-chest") @ConfigEntry(path = "island.reset.on-leave.ender-chest")
private boolean onLeaveResetEnderChest = false; 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 // Sethome
@ConfigEntry(path = "island.sethome.nether.allow") @ConfigEntry(path = "island.sethome.nether.allow")
private boolean allowSetHomeInNether = true; private boolean allowSetHomeInNether = true;
@ -1125,4 +1134,36 @@ public class Settings implements WorldSettings {
public void setDeathsResetOnNewIsland(boolean deathsResetOnNew) { public void setDeathsResetOnNewIsland(boolean deathsResetOnNew) {
this.deathsResetOnNewIsland = deathsResetOnNew; this.deathsResetOnNewIsland = deathsResetOnNew;
} }
/**
* @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

@ -212,7 +212,7 @@ island:
# Overrides the on-leave inventory reset for kicked players. # Overrides the on-leave inventory reset for kicked players.
kicked-keep-inventory: false kicked-keep-inventory: false
on-join: on-join:
# What the plugin should reset when the player joins or creates an island # What the addon should reset when the player joins or creates an island
# Reset Money - if this is true, will reset the player's money to the starting money # Reset Money - if this is true, will reset the player's money to the starting money
# Recommendation is that this is set to true, but if you run multi-worlds # Recommendation is that this is set to true, but if you run multi-worlds
# make sure your economy handles multi-worlds too. # make sure your economy handles multi-worlds too.
@ -235,6 +235,11 @@ island:
inventory: false inventory: false
# Reset Ender Chest - if true, the player's Ender Chest will be cleared. # Reset Ender Chest - if true, the player's Ender Chest will be cleared.
ender-chest: false 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: sethome:
nether: nether:
allow: true allow: true