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
5 changed files with 7 additions and 4 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")) {