Config to allow fire spread and damage within claims (#445)
This commit is contained in:
parent
cd41d06cbb
commit
f96d62aa05
|
|
@ -661,6 +661,7 @@ public class BlockEventHandler implements Listener
|
|||
//never spread into a claimed area, regardless of settings
|
||||
if(this.dataStore.getClaimAt(spreadEvent.getBlock().getLocation(), false, null) != null)
|
||||
{
|
||||
if(GriefPrevention.instance.config_claims_firespreads) return;
|
||||
spreadEvent.setCancelled(true);
|
||||
|
||||
//if the source of the spread is not fire on netherrack, put out that source fire to save cpu cycles
|
||||
|
|
@ -714,6 +715,7 @@ public class BlockEventHandler implements Listener
|
|||
//never burn claimed blocks, regardless of settings
|
||||
if(this.dataStore.getClaimAt(burnEvent.getBlock().getLocation(), false, null) != null)
|
||||
{
|
||||
if(GriefPrevention.instance.config_claims_firedamages) return;
|
||||
burnEvent.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@ public class GriefPrevention extends JavaPlugin
|
|||
public ArrayList<String> config_claims_commandsRequiringAccessTrust; //the list of slash commands requiring access trust when in a claim
|
||||
public boolean config_claims_supplyPlayerManual; //whether to give new players a book with land claim help in it
|
||||
public int config_claims_manualDeliveryDelaySeconds; //how long to wait before giving a book to a new player
|
||||
|
||||
public boolean config_claims_firespreads; //whether fire will spread in claims
|
||||
public boolean config_claims_firedamages; //whether fire will damage in claims
|
||||
|
||||
public ArrayList<World> config_siege_enabledWorlds; //whether or not /siege is enabled on this server
|
||||
public ArrayList<Material> config_siege_blocks; //which blocks will be breakable in siege mode
|
||||
|
|
@ -582,7 +585,10 @@ public class GriefPrevention extends JavaPlugin
|
|||
String accessTrustSlashCommands = config.getString("GriefPrevention.Claims.CommandsRequiringAccessTrust", "/sethome");
|
||||
this.config_claims_supplyPlayerManual = config.getBoolean("GriefPrevention.Claims.DeliverManuals", true);
|
||||
this.config_claims_manualDeliveryDelaySeconds = config.getInt("GriefPrevention.Claims.ManualDeliveryDelaySeconds", 30);
|
||||
|
||||
|
||||
this.config_claims_firespreads = config.getBoolean("GriefPrevention.Claims.FireSpreadsInClaims", false);
|
||||
this.config_claims_firedamages = config.getBoolean("GriefPrevention.Claims.FireDamagesInClaims", false);
|
||||
|
||||
this.config_spam_enabled = config.getBoolean("GriefPrevention.Spam.Enabled", true);
|
||||
this.config_spam_loginCooldownSeconds = config.getInt("GriefPrevention.Spam.LoginCooldownSeconds", 60);
|
||||
this.config_spam_loginLogoutNotificationsPerMinute = config.getInt("GriefPrevention.Spam.LoginLogoutNotificationsPerMinute", 5);
|
||||
|
|
@ -831,7 +837,10 @@ public class GriefPrevention extends JavaPlugin
|
|||
outConfig.set("GriefPrevention.Claims.CommandsRequiringAccessTrust", accessTrustSlashCommands);
|
||||
outConfig.set("GriefPrevention.Claims.DeliverManuals", config_claims_supplyPlayerManual);
|
||||
outConfig.set("GriefPrevention.Claims.ManualDeliveryDelaySeconds", config_claims_manualDeliveryDelaySeconds);
|
||||
|
||||
|
||||
outConfig.set("GriefPrevention.Claims.FireSpreadsInClaims", config_claims_firespreads);
|
||||
outConfig.set("GriefPrevention.Claims.FireDamagesInClaims", config_claims_firedamages);
|
||||
|
||||
outConfig.set("GriefPrevention.Spam.Enabled", this.config_spam_enabled);
|
||||
outConfig.set("GriefPrevention.Spam.LoginCooldownSeconds", this.config_spam_loginCooldownSeconds);
|
||||
outConfig.set("GriefPrevention.Spam.LoginLogoutNotificationsPerMinute", this.config_spam_loginLogoutNotificationsPerMinute);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user