diff --git a/src/me/ryanhamshire/GriefPrevention/EntityEventHandler.java b/src/me/ryanhamshire/GriefPrevention/EntityEventHandler.java index a967110..3dc0bbe 100644 --- a/src/me/ryanhamshire/GriefPrevention/EntityEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/EntityEventHandler.java @@ -248,7 +248,7 @@ class EntityEventHandler implements Listener claim = this.dataStore.getClaimAt(block.getLocation(), false, claim); //if the block is claimed, remove it from the list of destroyed blocks - if(claim != null && !claim.areExplosivesAllowed) + if(claim != null && !claim.areExplosivesAllowed && GriefPrevention.instance.config_blockClaimExplosions) { blocks.remove(i--); } diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index d079d91..66a476c 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -135,6 +135,7 @@ public class GriefPrevention extends JavaPlugin public double config_economy_claimBlocksPurchaseCost; //cost to purchase a claim block. set to zero to disable purchase. public double config_economy_claimBlocksSellValue; //return on a sold claim block. set to zero to disable sale. + public boolean config_blockClaimExplosions; //whether explosions may destroy claimed blocks public boolean config_blockSurfaceCreeperExplosions; //whether creeper explosions near or above the surface destroy blocks public boolean config_blockSurfaceOtherExplosions; //whether non-creeper explosions near or above the surface destroy blocks public boolean config_blockSkyTrees; //whether players can build trees on platforms in the sky @@ -500,6 +501,7 @@ public class GriefPrevention extends JavaPlugin this.config_lockDeathDropsInPvpWorlds = config.getBoolean("GriefPrevention.ProtectItemsDroppedOnDeath.PvPWorlds", false); this.config_lockDeathDropsInNonPvpWorlds = config.getBoolean("GriefPrevention.ProtectItemsDroppedOnDeath.NonPvPWorlds", true); + this.config_blockClaimExplosions = config.getBoolean("GriefPrevention.BlockLandClaimExplosions", true); this.config_blockSurfaceCreeperExplosions = config.getBoolean("GriefPrevention.BlockSurfaceCreeperExplosions", true); this.config_blockSurfaceOtherExplosions = config.getBoolean("GriefPrevention.BlockSurfaceOtherExplosions", true); this.config_blockSkyTrees = config.getBoolean("GriefPrevention.LimitSkyTrees", true); @@ -720,6 +722,7 @@ public class GriefPrevention extends JavaPlugin outConfig.set("GriefPrevention.ProtectItemsDroppedOnDeath.PvPWorlds", this.config_lockDeathDropsInPvpWorlds); outConfig.set("GriefPrevention.ProtectItemsDroppedOnDeath.NonPvPWorlds", this.config_lockDeathDropsInNonPvpWorlds); + outConfig.set("GriefPrevention.BlockLandClaimExplosions", this.config_blockClaimExplosions); outConfig.set("GriefPrevention.BlockSurfaceCreeperExplosions", this.config_blockSurfaceCreeperExplosions); outConfig.set("GriefPrevention.BlockSurfaceOtherExplosions", this.config_blockSurfaceOtherExplosions); outConfig.set("GriefPrevention.LimitSkyTrees", this.config_blockSkyTrees);