Skip to content

Commit

Permalink
Version 4.4.0 (#135)
Browse files Browse the repository at this point in the history
* Version 4.2.2

* Added protection against console error spam if island size is zero.

If the protection range is 0 then the caluclations to teleport players
back into the border will result in infinite values and other
strangeness so this prevents that. This is an edge case and only really
happens when the island size has been set wrongly.

* Update README.md

* Fix perm issue #120 (#121)

* feat: detect mounted players on entity (#88)

* Version 4.3.0

* Changes to work with 1.20.6. Has backwards compatibility. (#125)

* Fix imports

* Update zh-CN.yml (#127)

* Latvian translationa (#128)

* Translate lv.yml via GitLocalize

* Translate lv.yml via GitLocalize

---------

Co-authored-by: mt-gitlocalize <[email protected]>
Co-authored-by: tastybento <[email protected]>

* Add explicit bordertype command (#130)

* Add explicit bordertype command

* Add perm to addon.yml and make it default to off

* Remove unused method.

* 131 null to location (#132)

* Version 4.3.1

* Add defensive code for null to's #131

* If border is off, then don't move player back.

* Update to MC 1.21.3 and codemc updates (#134)

---------

Co-authored-by: evlad <[email protected]>
Co-authored-by: Minecraft_15 <[email protected]>
Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com>
Co-authored-by: mt-gitlocalize <[email protected]>
  • Loading branch information
5 people authored Nov 17, 2024
1 parent e89dbfb commit fa33dd6
Show file tree
Hide file tree
Showing 10 changed files with 377 additions and 40 deletions.
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@
</issueManagement>

<distributionManagement>
<snapshotRepository>
<id>codemc-snapshots</id>
<url>https://repo.codemc.org/repository/maven-snapshots</url>
</snapshotRepository>
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.org/repository/maven-releases</url>
<id>bentoboxworld</id>
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
</repository>
</distributionManagement>

Expand All @@ -49,12 +45,12 @@
<java.version>17</java.version>
<powermock.version>2.0.9</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>2.0.0-SNAPSHOT</bentobox.version>
<spigot.version>1.21.3-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>2.7.1-SNAPSHOT</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>4.3.0</build.version>
<build.version>4.4.0</build.version>
<build.number>-LOCAL</build.number>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_Border</sonar.projectKey>
Expand Down Expand Up @@ -109,6 +105,10 @@
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
</repository>
<repository>
<id>bentoboxworld</id>
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
</repository>
<repository>
<id>codemc</id>
<url>https://repo.codemc.org/repository/maven-snapshots/</url>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/world/bentobox/border/Border.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import world.bentobox.bentobox.api.configuration.Config;
import world.bentobox.bentobox.api.metadata.MetaDataValue;
import world.bentobox.bentobox.util.Util;
import world.bentobox.border.commands.BorderTypeCommand;
import world.bentobox.border.commands.IslandBorderCommand;
import world.bentobox.border.listeners.BorderShower;
import world.bentobox.border.listeners.PlayerListener;
Expand Down Expand Up @@ -52,6 +53,7 @@ public void onEnable() {

log("Border hooking into " + gameModeAddon.getDescription().getName());
gameModeAddon.getPlayerCommand().ifPresent(c -> new IslandBorderCommand(this, c, "border"));
gameModeAddon.getPlayerCommand().ifPresent(c -> new BorderTypeCommand(this, c, "bordertype"));
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
*/
public final class BorderTypeCommand extends CompositeCommand {

public static final String BORDER_TYPE_COMMAND_PERM = "border.type";
private final Border addon;
private Island island;
private final List<String> availableTypes;

public BorderTypeCommand(Border addon, CompositeCommand parent) {
super(addon, parent, "type");
public BorderTypeCommand(Border addon, CompositeCommand parent, String commandLabel) {
super(addon, parent, commandLabel);
this.addon = addon;
this.availableTypes = addon.getAvailableBorderTypesView()
.stream()
Expand All @@ -35,7 +34,7 @@ public BorderTypeCommand(Border addon, CompositeCommand parent) {

@Override
public void setup() {
this.setPermission(BORDER_TYPE_COMMAND_PERM);
this.setPermission("border." + this.getLabel());
this.setDescription("border.set-type.description");
this.setOnlyPlayer(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void setup() {
this.setOnlyPlayer(true);
setConfigurableRankCommand();

new BorderTypeCommand(this.getAddon(), this);
new BorderTypeCommand(this.getAddon(), this, "type");
}

@Override
Expand Down
Loading

0 comments on commit fa33dd6

Please sign in to comment.