Skip to content

Commit bbb3736

Browse files
authored
Prevent out of world claims (#4475)
* Prevent out of world claims * update java version in workflows
1 parent 1ebcbf6 commit bbb3736

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

.github/workflows/build-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
uses: actions/setup-java@v4
1717
with:
1818
distribution: temurin
19-
java-version: 17
19+
java-version: 21
2020
- name: Clean Build
2121
run: ./gradlew clean build

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/setup-java@v4
1717
with:
1818
distribution: temurin
19-
java-version: 17
19+
java-version: 21
2020
- name: Clean Build
2121
run: ./gradlew clean build
2222
- name: Determine release status

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/setup-java@v4
2626
with:
2727
distribution: temurin
28-
java-version: 17
28+
java-version: 21
2929
- name: Initialize CodeQL
3030
uses: github/codeql-action/init@v3
3131
with:

Core/src/main/java/com/plotsquared/core/plot/Plot.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,6 +2182,9 @@ public BlockLoc getPosition() {
21822182
* @return if the given player can claim the plot
21832183
*/
21842184
public boolean canClaim(@NonNull PlotPlayer<?> player) {
2185+
if (!WorldUtil.isValidLocation(getBottomAbs())) {
2186+
return false;
2187+
}
21852188
PlotCluster cluster = this.getCluster();
21862189
if (cluster != null) {
21872190
if (!cluster.isAdded(player.getUUID()) && !player.hasPermission("plots.admin.command.claim")) {

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ subprojects {
8585

8686
plugins.withId("java") {
8787
the<JavaPluginExtension>().toolchain {
88-
languageVersion.set(JavaLanguageVersion.of(17))
88+
languageVersion.set(JavaLanguageVersion.of(21))
8989
}
9090
}
9191

0 commit comments

Comments
 (0)