Prevent out of world claims

This commit is contained in:
SirYwell 2024-08-11 22:23:38 +02:00
parent 1ebcbf60a6
commit 5eaa518cd9
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

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))
}
}