Skip to content

Commit

Permalink
Update to 1.8.0 and new Bentobox API
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Sep 28, 2019
1 parent 70aab30 commit b53d508
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
<powermock.version>2.0.2</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.7.0-SNAPSHOT</bentobox.version>
<bentobox.version>1.8.0-SNAPSHOT</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.7.0</build.version>
<build.version>1.8.0</build.version>
</properties>

<!-- Profiles will allow to automatically change build version. -->
Expand Down
39 changes: 39 additions & 0 deletions src/main/java/world/bentobox/skygrid/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "area.reset.on-leave.ender-chest")
private boolean onLeaveResetEnderChest = false;

// Commands
@ConfigComment("List of commands to run when a player joins.")
@ConfigEntry(path = "area.commands.on-join")
private List<String> onJoinCommands = new ArrayList<>();

@ConfigComment("list of commands to run when a player leaves.")
@ConfigEntry(path = "area.commands.on-leave")
private List<String> onLeaveCommands = new ArrayList<>();

// Sethome
@ConfigEntry(path = "area.sethome.nether.allow")
private boolean allowSetHomeInNether = true;
Expand Down Expand Up @@ -1163,4 +1172,34 @@ public boolean isDeathsResetOnNewIsland() {
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;
}
}
5 changes: 5 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,11 @@ area:
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
Expand Down

0 comments on commit b53d508

Please sign in to comment.