Scale nearby claiming amount based on dimension.
This commit is contained in:
parent
80148d9f58
commit
2a7fd7c557
|
|
@ -747,6 +747,8 @@ public class Claim
|
||||||
public boolean canClaimNear(Player player, int howNear) {
|
public boolean canClaimNear(Player player, int howNear) {
|
||||||
if (GriefPrevention.instance.dataStore.getPlayerData(player.getUniqueId()).ignoreClaims) return true;
|
if (GriefPrevention.instance.dataStore.getPlayerData(player.getUniqueId()).ignoreClaims) return true;
|
||||||
Location location = player.getLocation();
|
Location location = player.getLocation();
|
||||||
|
World world = location.getWorld();
|
||||||
|
howNear = (int) Math.ceil(howNear / world.getCoordinateScale());
|
||||||
Claim claim = new Claim
|
Claim claim = new Claim
|
||||||
(new Location(this.lesserBoundaryCorner.getWorld(), this.lesserBoundaryCorner.getBlockX() - howNear, this.lesserBoundaryCorner.getBlockY(), this.lesserBoundaryCorner.getBlockZ() - howNear),
|
(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),
|
new Location(this.greaterBoundaryCorner.getWorld(), this.greaterBoundaryCorner.getBlockX() + howNear, this.greaterBoundaryCorner.getBlockY(), this.greaterBoundaryCorner.getBlockZ() + howNear),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user