Survival Requiring Claims Mode

Disallows building/breaking outside of land claims, but doesn't involve
the other creative-mode rules.
This commit is contained in:
ryanhamshire 2015-02-20 18:56:46 -08:00
parent ff00b78189
commit c40e8ac75c
2 changed files with 4 additions and 3 deletions

View File

@ -4,5 +4,6 @@ public enum ClaimsMode
{ {
Survival, Survival,
Creative, Creative,
Disabled Disabled,
SurvivalRequiringClaims
} }

View File

@ -2456,7 +2456,7 @@ public class GriefPrevention extends JavaPlugin
if(claim == null) if(claim == null)
{ {
//no building in the wilderness in creative mode //no building in the wilderness in creative mode
if(this.creativeRulesApply(location)) if(this.creativeRulesApply(location) || this.config_claims_worldModes.get(location.getWorld()) == ClaimsMode.SurvivalRequiringClaims)
{ {
String reason = this.dataStore.getMessage(Messages.NoBuildOutsideClaims); String reason = this.dataStore.getMessage(Messages.NoBuildOutsideClaims);
if(player.hasPermission("griefprevention.ignoreclaims")) if(player.hasPermission("griefprevention.ignoreclaims"))
@ -2493,7 +2493,7 @@ public class GriefPrevention extends JavaPlugin
if(claim == null) if(claim == null)
{ {
//no building in the wilderness in creative mode //no building in the wilderness in creative mode
if(this.creativeRulesApply(location)) if(this.creativeRulesApply(location) || this.config_claims_worldModes.get(location.getWorld()) == ClaimsMode.SurvivalRequiringClaims)
{ {
String reason = this.dataStore.getMessage(Messages.NoBuildOutsideClaims); String reason = this.dataStore.getMessage(Messages.NoBuildOutsideClaims);
if(player.hasPermission("griefprevention.ignoreclaims")) if(player.hasPermission("griefprevention.ignoreclaims"))