Chest-based claims for non-survival worlds.
Players may now create their first land claims in creative mode or survival-requiring-claims mode worlds by placing chests.
This commit is contained in:
parent
bb7c73b2f7
commit
21df6290df
|
|
@ -2803,6 +2803,9 @@ public class GriefPrevention extends JavaPlugin
|
||||||
{
|
{
|
||||||
//no building in the wilderness in creative mode
|
//no building in the wilderness in creative mode
|
||||||
if(this.creativeRulesApply(location) || this.config_claims_worldModes.get(location.getWorld()) == ClaimsMode.SurvivalRequiringClaims)
|
if(this.creativeRulesApply(location) || this.config_claims_worldModes.get(location.getWorld()) == ClaimsMode.SurvivalRequiringClaims)
|
||||||
|
{
|
||||||
|
//exception: when chest claims are enabled, players who have zero land claims and are placing a chest
|
||||||
|
if(material != Material.CHEST || playerData.getClaims().size() > 0 || GriefPrevention.instance.config_claims_automaticClaimsForNewPlayersRadius == -1)
|
||||||
{
|
{
|
||||||
String reason = this.dataStore.getMessage(Messages.NoBuildOutsideClaims);
|
String reason = this.dataStore.getMessage(Messages.NoBuildOutsideClaims);
|
||||||
if(player.hasPermission("griefprevention.ignoreclaims"))
|
if(player.hasPermission("griefprevention.ignoreclaims"))
|
||||||
|
|
@ -2810,6 +2813,11 @@ public class GriefPrevention extends JavaPlugin
|
||||||
reason += " " + this.dataStore.getMessage(Messages.CreativeBasicsVideo2, DataStore.CREATIVE_VIDEO_URL);
|
reason += " " + this.dataStore.getMessage(Messages.CreativeBasicsVideo2, DataStore.CREATIVE_VIDEO_URL);
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//but it's fine in survival mode
|
//but it's fine in survival mode
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user