mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Prevent out of world claims (#4475)
* Prevent out of world claims * update java version in workflows
This commit is contained in:
parent
1ebcbf60a6
commit
bbb3736846
2
.github/workflows/build-pr.yml
vendored
2
.github/workflows/build-pr.yml
vendored
@ -16,6 +16,6 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 21
|
||||||
- name: Clean Build
|
- name: Clean Build
|
||||||
run: ./gradlew clean build
|
run: ./gradlew clean build
|
||||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 21
|
||||||
- name: Clean Build
|
- name: Clean Build
|
||||||
run: ./gradlew clean build
|
run: ./gradlew clean build
|
||||||
- name: Determine release status
|
- name: Determine release status
|
||||||
|
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 21
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
|
@ -2182,6 +2182,9 @@ public class Plot {
|
|||||||
* @return if the given player can claim the plot
|
* @return if the given player can claim the plot
|
||||||
*/
|
*/
|
||||||
public boolean canClaim(@NonNull PlotPlayer<?> player) {
|
public boolean canClaim(@NonNull PlotPlayer<?> player) {
|
||||||
|
if (!WorldUtil.isValidLocation(getBottomAbs())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
PlotCluster cluster = this.getCluster();
|
PlotCluster cluster = this.getCluster();
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
if (!cluster.isAdded(player.getUUID()) && !player.hasPermission("plots.admin.command.claim")) {
|
if (!cluster.isAdded(player.getUUID()) && !player.hasPermission("plots.admin.command.claim")) {
|
||||||
|
@ -85,7 +85,7 @@ subprojects {
|
|||||||
|
|
||||||
plugins.withId("java") {
|
plugins.withId("java") {
|
||||||
the<JavaPluginExtension>().toolchain {
|
the<JavaPluginExtension>().toolchain {
|
||||||
languageVersion.set(JavaLanguageVersion.of(17))
|
languageVersion.set(JavaLanguageVersion.of(21))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user