Scale nearby claiming amount based on dimension.

This commit is contained in:
Len 2022-09-26 09:01:19 +02:00
parent 80148d9f58
commit 2a7fd7c557

View File

@ -747,6 +747,8 @@ public class Claim
public boolean canClaimNear(Player player, int howNear) {
if (GriefPrevention.instance.dataStore.getPlayerData(player.getUniqueId()).ignoreClaims) return true;
Location location = player.getLocation();
World world = location.getWorld();
howNear = (int) Math.ceil(howNear / world.getCoordinateScale());
Claim claim = new Claim
(new Location(this.lesserBoundaryCorner.getWorld(), this.lesserBoundaryCorner.getBlockX() - howNear, this.lesserBoundaryCorner.getBlockY(), this.lesserBoundaryCorner.getBlockZ() - howNear),
new Location(this.greaterBoundaryCorner.getWorld(), this.greaterBoundaryCorner.getBlockX() + howNear, this.greaterBoundaryCorner.getBlockY(), this.greaterBoundaryCorner.getBlockZ() + howNear),