Skip to content

Commit fa33dd6

Browse files
tastybentoemmanuelvladhuguytgitlocalize-app[bot]mt-gitlocalize
authored
Version 4.4.0 (#135)
* 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]>
1 parent e89dbfb commit fa33dd6

File tree

10 files changed

+377
-40
lines changed

10 files changed

+377
-40
lines changed

pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,9 @@
3333
</issueManagement>
3434

3535
<distributionManagement>
36-
<snapshotRepository>
37-
<id>codemc-snapshots</id>
38-
<url>https://repo.codemc.org/repository/maven-snapshots</url>
39-
</snapshotRepository>
4036
<repository>
41-
<id>codemc-releases</id>
42-
<url>https://repo.codemc.org/repository/maven-releases</url>
37+
<id>bentoboxworld</id>
38+
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
4339
</repository>
4440
</distributionManagement>
4541

@@ -49,12 +45,12 @@
4945
<java.version>17</java.version>
5046
<powermock.version>2.0.9</powermock.version>
5147
<!-- More visible way how to change dependency versions -->
52-
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version>
53-
<bentobox.version>2.0.0-SNAPSHOT</bentobox.version>
48+
<spigot.version>1.21.3-R0.1-SNAPSHOT</spigot.version>
49+
<bentobox.version>2.7.1-SNAPSHOT</bentobox.version>
5450
<!-- Revision variable removes warning about dynamic version -->
5551
<revision>${build.version}-SNAPSHOT</revision>
5652
<!-- This allows to change between versions and snapshots. -->
57-
<build.version>4.3.0</build.version>
53+
<build.version>4.4.0</build.version>
5854
<build.number>-LOCAL</build.number>
5955
<!-- Sonar Cloud -->
6056
<sonar.projectKey>BentoBoxWorld_Border</sonar.projectKey>
@@ -109,6 +105,10 @@
109105
<id>spigot-repo</id>
110106
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
111107
</repository>
108+
<repository>
109+
<id>bentoboxworld</id>
110+
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
111+
</repository>
112112
<repository>
113113
<id>codemc</id>
114114
<url>https://repo.codemc.org/repository/maven-snapshots/</url>

src/main/java/world/bentobox/border/Border.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import world.bentobox.bentobox.api.configuration.Config;
1515
import world.bentobox.bentobox.api.metadata.MetaDataValue;
1616
import world.bentobox.bentobox.util.Util;
17+
import world.bentobox.border.commands.BorderTypeCommand;
1718
import world.bentobox.border.commands.IslandBorderCommand;
1819
import world.bentobox.border.listeners.BorderShower;
1920
import world.bentobox.border.listeners.PlayerListener;
@@ -52,6 +53,7 @@ public void onEnable() {
5253

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

src/main/java/world/bentobox/border/commands/BorderTypeCommand.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
*/
2020
public final class BorderTypeCommand extends CompositeCommand {
2121

22-
public static final String BORDER_TYPE_COMMAND_PERM = "border.type";
2322
private final Border addon;
2423
private Island island;
2524
private final List<String> availableTypes;
2625

27-
public BorderTypeCommand(Border addon, CompositeCommand parent) {
28-
super(addon, parent, "type");
26+
public BorderTypeCommand(Border addon, CompositeCommand parent, String commandLabel) {
27+
super(addon, parent, commandLabel);
2928
this.addon = addon;
3029
this.availableTypes = addon.getAvailableBorderTypesView()
3130
.stream()
@@ -35,7 +34,7 @@ public BorderTypeCommand(Border addon, CompositeCommand parent) {
3534

3635
@Override
3736
public void setup() {
38-
this.setPermission(BORDER_TYPE_COMMAND_PERM);
37+
this.setPermission("border." + this.getLabel());
3938
this.setDescription("border.set-type.description");
4039
this.setOnlyPlayer(true);
4140
}

src/main/java/world/bentobox/border/commands/IslandBorderCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void setup() {
2828
this.setOnlyPlayer(true);
2929
setConfigurableRankCommand();
3030

31-
new BorderTypeCommand(this.getAddon(), this);
31+
new BorderTypeCommand(this.getAddon(), this, "type");
3232
}
3333

3434
@Override

0 commit comments

Comments
 (0)