From 5eaa518cd940aef0696311645facc5c065c11ef2 Mon Sep 17 00:00:00 2001 From: SirYwell Date: Sun, 11 Aug 2024 22:23:38 +0200 Subject: [PATCH] Prevent out of world claims --- Core/src/main/java/com/plotsquared/core/plot/Plot.java | 3 +++ build.gradle.kts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/plot/Plot.java b/Core/src/main/java/com/plotsquared/core/plot/Plot.java index 91f6016b1..3913ddfc5 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/Plot.java +++ b/Core/src/main/java/com/plotsquared/core/plot/Plot.java @@ -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")) { diff --git a/build.gradle.kts b/build.gradle.kts index 8b3cac8e8..2c308a9ff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -85,7 +85,7 @@ subprojects { plugins.withId("java") { the().toolchain { - languageVersion.set(JavaLanguageVersion.of(17)) + languageVersion.set(JavaLanguageVersion.of(21)) } }