From 627049ba8a2dd2c656981f82bce962968ec6a9d3 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Thu, 10 Dec 2015 14:08:18 -0800 Subject: [PATCH] Disable claim creation in worlds not in config. Not defined in the config indicates the world wasn't loaded at GP boot, which will cause a claim loading problem on next boot. Better to block their creation than to have players get griefed because the claim experiences a loading problem later. --- src/me/ryanhamshire/GriefPrevention/GriefPrevention.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index cd149da..0c02ec0 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -2827,7 +2827,8 @@ public class GriefPrevention extends JavaPlugin //checks whether players can create claims in a world public boolean claimsEnabledForWorld(World world) { - return this.config_claims_worldModes.get(world) != ClaimsMode.Disabled; + ClaimsMode mode = this.config_claims_worldModes.get(world); + return mode != null && mode != ClaimsMode.Disabled; } //determines whether creative anti-grief rules apply at a location