From 78f306dc9f2eae62938762444acd4ee9fbe1ff6a Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Mon, 26 Jan 2015 16:28:23 -0800 Subject: [PATCH] Prevent ExtendIntoGroundDistance < 0 Someone tried this despite the default value being a positive number, to bad effect. --- src/me/ryanhamshire/GriefPrevention/GriefPrevention.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index 3447b72..99c5411 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -486,7 +486,7 @@ public class GriefPrevention extends JavaPlugin this.config_claims_maxAccruedBlocks = config.getInt("GriefPrevention.Claims.MaxAccruedBlocks", 80000); this.config_claims_abandonReturnRatio = config.getDouble("GriefPrevention.Claims.AbandonReturnRatio", 1); this.config_claims_automaticClaimsForNewPlayersRadius = config.getInt("GriefPrevention.Claims.AutomaticNewPlayerClaimsRadius", 4); - this.config_claims_claimsExtendIntoGroundDistance = config.getInt("GriefPrevention.Claims.ExtendIntoGroundDistance", 5); + this.config_claims_claimsExtendIntoGroundDistance = Math.abs(config.getInt("GriefPrevention.Claims.ExtendIntoGroundDistance", 5)); this.config_claims_creationRequiresPermission = config.getBoolean("GriefPrevention.Claims.CreationRequiresPermission", false); this.config_claims_minSize = config.getInt("GriefPrevention.Claims.MinimumSize", 10); this.config_claims_maxDepth = config.getInt("GriefPrevention.Claims.MaximumDepth", 0);