Prevent out of world claims (#4475)

* Prevent out of world claims

* update java version in workflows
This commit is contained in:
Hannes Greule 2024-08-13 07:40:09 +02:00 committed by GitHub
parent 1ebcbf60a6
commit bbb3736846
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 4 deletions

View File

@ -16,6 +16,6 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21
- name: Clean Build
run: ./gradlew clean build

View File

@ -16,7 +16,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21
- name: Clean Build
run: ./gradlew clean build
- name: Determine release status

View File

@ -25,7 +25,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:

View File

@ -2182,6 +2182,9 @@ public class Plot {
* @return if the given player can claim the plot
*/
public boolean canClaim(@NonNull PlotPlayer<?> player) {
if (!WorldUtil.isValidLocation(getBottomAbs())) {
return false;
}
PlotCluster cluster = this.getCluster();
if (cluster != null) {
if (!cluster.isAdded(player.getUUID()) && !player.hasPermission("plots.admin.command.claim")) {

View File

@ -85,7 +85,7 @@ subprojects {
plugins.withId("java") {
the<JavaPluginExtension>().toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
}
}