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.
This commit is contained in:
ryanhamshire 2015-12-10 14:08:18 -08:00
parent ddcb7b25c9
commit 627049ba8a

View File

@ -2827,7 +2827,8 @@ public class GriefPrevention extends JavaPlugin
//checks whether players can create claims in a world //checks whether players can create claims in a world
public boolean claimsEnabledForWorld(World 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 //determines whether creative anti-grief rules apply at a location