Skip to content

Commit

Permalink
Border updated to latest WorldBorder API and 1.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jun 28, 2020
1 parent 390ac17 commit 0035e31
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
<java.version>1.8</java.version>
<powermock.version>1.7.4</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.13.2-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.11.0</bentobox.version>
<worldborderapi.version>1.0.3</worldborderapi.version>
<spigot.version>1.16.1-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.14.0-SNAPSHOT</bentobox.version>
<worldborderapi.version>1.161.2</worldborderapi.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>1.0.8</build.version>
<build.version>1.0.9</build.version>
<build.number>-LOCAL</build.number>
</properties>

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/world/bentobox/border/Border.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void uncachePlayer(@Nullable UUID uniqueId) {
return;
}
// NOTE: saveObject is NOT a blocking operation
handler.saveObject(data);
handler.saveObjectAsync(data);
}

public void updateBorder(Player player, Location location) {
Expand All @@ -70,6 +70,7 @@ public void removeBorder(Player player) {

@Override
public void onEnable() {
log("Border enabling");
handler = new Database<>(this, BorderData.class);
borderCache = new HashMap<>();

Expand All @@ -93,7 +94,7 @@ public void onEnable() {
@Override
public void onDisable() {
if (borderCache != null) {
borderCache.values().forEach(handler::saveObject);
borderCache.values().forEach(handler::saveObjectAsync);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/addon.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Border
main: world.bentobox.border.Border
version: ${version}${build.number}
api-version: ${bentobox.version}
api-version: 1.14
icon: BEDROCK

prefix: Border
Expand Down

0 comments on commit 0035e31

Please sign in to comment.