Skip to content

Commit 5eaa518

Browse files
committed
Prevent out of world claims
1 parent 1ebcbf6 commit 5eaa518

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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)