Skip to content

Commit 8c72490

Browse files
authored
Merge pull request #151 from BentoBoxWorld/develop
Release 4.6.0
2 parents 7a5f93d + 5dc6bc2 commit 8c72490

File tree

12 files changed

+940
-272
lines changed

12 files changed

+940
-272
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
- uses: actions/checkout@v3
1515
with:
1616
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
17-
- name: Set up JDK 17
17+
- name: Set up JDK 21
1818
uses: actions/setup-java@v3
1919
with:
2020
distribution: 'adopt'
21-
java-version: 17
21+
java-version: 21
2222
- name: Cache SonarCloud packages
2323
uses: actions/cache@v3
2424
with:
@@ -35,4 +35,4 @@ jobs:
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3737
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
38-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
38+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

pom.xml

Lines changed: 49 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,16 @@
4242
<properties>
4343
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4444
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
45-
<java.version>17</java.version>
46-
<powermock.version>2.0.9</powermock.version>
45+
<java.version>21</java.version>
46+
<junit.version>5.10.2</junit.version>
47+
<mockito.version>5.11.0</mockito.version>
4748
<!-- More visible way how to change dependency versions -->
48-
<spigot.version>1.21.3-R0.1-SNAPSHOT</spigot.version>
49-
<bentobox.version>2.7.1-SNAPSHOT</bentobox.version>
49+
<paper.version>1.21.10-R0.1-SNAPSHOT</paper.version>
50+
<bentobox.version>3.10.0</bentobox.version>
5051
<!-- Revision variable removes warning about dynamic version -->
5152
<revision>${build.version}-SNAPSHOT</revision>
5253
<!-- This allows to change between versions and snapshots. -->
53-
<build.version>4.5.1</build.version>
54+
<build.version>4.6.0</build.version>
5455
<build.number>-LOCAL</build.number>
5556
<!-- Sonar Cloud -->
5657
<sonar.projectKey>BentoBoxWorld_Border</sonar.projectKey>
@@ -102,8 +103,12 @@
102103

103104
<repositories>
104105
<repository>
105-
<id>spigot-repo</id>
106-
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
106+
<id>jitpack.io</id>
107+
<url>https://jitpack.io</url>
108+
</repository>
109+
<repository>
110+
<id>papermc</id>
111+
<url>https://repo.papermc.io/repository/maven-public/</url>
107112
</repository>
108113
<repository>
109114
<id>bentoboxworld</id>
@@ -120,29 +125,42 @@
120125
</repositories>
121126

122127
<dependencies>
123-
<!-- Mockito (Unit testing) This goes at the top to ensure the dependencies are accurate. -->
124-
<!-- This is required for PowerMockito to work and must be placed before it -->
125128
<dependency>
126-
<groupId>org.javassist</groupId>
127-
<artifactId>javassist</artifactId>
128-
<version>3.30.2-GA</version>
129-
</dependency>
130-
<dependency>
131-
<groupId>org.powermock</groupId>
132-
<artifactId>powermock-module-junit4</artifactId>
133-
<version>${powermock.version}</version>
129+
<groupId>com.github.MockBukkit</groupId>
130+
<artifactId>MockBukkit</artifactId>
131+
<version>v1.21-SNAPSHOT</version>
134132
<scope>test</scope>
135-
</dependency>
133+
</dependency>
136134
<dependency>
137-
<groupId>org.powermock</groupId>
138-
<artifactId>powermock-api-mockito2</artifactId>
139-
<version>${powermock.version}</version>
140-
<scope>test</scope>
135+
<groupId>io.papermc.paper</groupId>
136+
<artifactId>paper-api</artifactId>
137+
<version>${paper.version}</version>
138+
<scope>provided</scope>
141139
</dependency>
140+
141+
<!-- Mockito (Unit testing) -->
142+
<dependency>
143+
<groupId>org.junit.jupiter</groupId>
144+
<artifactId>junit-jupiter-api</artifactId>
145+
<version>${junit.version}</version>
146+
<scope>test</scope>
147+
</dependency>
148+
<dependency>
149+
<groupId>org.junit.jupiter</groupId>
150+
<artifactId>junit-jupiter-engine</artifactId>
151+
<version>${junit.version}</version>
152+
<scope>test</scope>
153+
</dependency>
154+
<dependency>
155+
<groupId>org.mockito</groupId>
156+
<artifactId>mockito-junit-jupiter</artifactId>
157+
<version>${mockito.version}</version>
158+
<scope>test</scope>
159+
</dependency>
142160
<dependency>
143161
<groupId>org.mockito</groupId>
144162
<artifactId>mockito-core</artifactId>
145-
<version>3.11.1</version>
163+
<version>${mockito.version}</version>
146164
<scope>test</scope>
147165
</dependency>
148166
<dependency>
@@ -151,13 +169,6 @@
151169
<version>${bentobox.version}</version>
152170
<scope>provided</scope>
153171
</dependency>
154-
<!-- Spigot API -->
155-
<dependency>
156-
<groupId>org.spigotmc</groupId>
157-
<artifactId>spigot-api</artifactId>
158-
<version>${spigot.version}</version>
159-
<scope>provided</scope>
160-
</dependency>
161172
</dependencies>
162173

163174
<build>
@@ -191,20 +202,20 @@
191202
<plugin>
192203
<groupId>org.apache.maven.plugins</groupId>
193204
<artifactId>maven-clean-plugin</artifactId>
194-
<version>3.1.0</version>
205+
<version>3.5.0</version>
195206
</plugin>
196207
<plugin>
197208
<groupId>org.apache.maven.plugins</groupId>
198209
<artifactId>maven-compiler-plugin</artifactId>
199-
<version>3.7.0</version>
210+
<version>3.14.1</version>
200211
<configuration>
201212
<release>${java.version}</release>
202213
</configuration>
203214
</plugin>
204215
<plugin>
205216
<groupId>org.apache.maven.plugins</groupId>
206217
<artifactId>maven-surefire-plugin</artifactId>
207-
<version>3.0.0-M5</version>
218+
<version>3.5.4</version>
208219
<configuration>
209220
<argLine>
210221
${argLine}
@@ -241,12 +252,12 @@
241252
<plugin>
242253
<groupId>org.apache.maven.plugins</groupId>
243254
<artifactId>maven-jar-plugin</artifactId>
244-
<version>3.1.0</version>
255+
<version>3.5.0</version>
245256
</plugin>
246257
<plugin>
247258
<groupId>org.apache.maven.plugins</groupId>
248259
<artifactId>maven-source-plugin</artifactId>
249-
<version>3.0.1</version>
260+
<version>3.4.0</version>
250261
<executions>
251262
<execution>
252263
<id>attach-sources</id>
@@ -259,17 +270,17 @@
259270
<plugin>
260271
<groupId>org.apache.maven.plugins</groupId>
261272
<artifactId>maven-install-plugin</artifactId>
262-
<version>2.5.2</version>
273+
<version>3.1.4</version>
263274
</plugin>
264275
<plugin>
265276
<groupId>org.apache.maven.plugins</groupId>
266277
<artifactId>maven-deploy-plugin</artifactId>
267-
<version>2.8.2</version>
278+
<version>3.1.4</version>
268279
</plugin>
269280
<plugin>
270281
<groupId>org.jacoco</groupId>
271282
<artifactId>jacoco-maven-plugin</artifactId>
272-
<version>0.8.10</version>
283+
<version>0.8.14</version>
273284
<configuration>
274285
<append>true</append>
275286
<excludes>

src/main/java/world/bentobox/border/listeners/ShowVirtualWorldBorder.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ public void showBorder(Player player, Island island) {
3535
|| !Objects.requireNonNull(User.getInstance(player)).getMetaData(BORDER_STATE_META_DATA).map(MetaDataValue::asBoolean).orElse(addon.getSettings().isShowByDefault())) {
3636
return;
3737
}
38-
Location l = island.getProtectionCenter();
39-
if (player.getWorld().getEnvironment() == Environment.NETHER) {
40-
l.multiply(8);
38+
39+
if (player.getWorld().getEnvironment() == Environment.NETHER && !addon.getPlugin().getIWM().isIslandNether(player.getWorld())) {
40+
return;
4141
}
42+
Location l = island.getProtectionCenter().toVector().toLocation(player.getWorld());
4243
WorldBorder wb = Bukkit.createWorldBorder();
4344
wb.setCenter(l);
4445
double size = Math.min(island.getRange() * 2D, (island.getProtectionRange() + addon.getSettings().getBarrierOffset()) * 2D);

0 commit comments

Comments
 (0)