This commit is contained in:
Ryan Hamshire 2012-11-18 12:24:47 -08:00
parent 7f600e7098
commit c7c9fe9f07
5 changed files with 27 additions and 4 deletions

View File

@ -2,7 +2,7 @@ name: GriefPrevention
main: me.ryanhamshire.GriefPrevention.GriefPrevention main: me.ryanhamshire.GriefPrevention.GriefPrevention
softdepend: [Vault, Multiverse-Core, My Worlds, MystCraft, Transporter] softdepend: [Vault, Multiverse-Core, My Worlds, MystCraft, Transporter]
dev-url: http://dev.bukkit.org/server-mods/grief-prevention dev-url: http://dev.bukkit.org/server-mods/grief-prevention
version: 7.0 version: 7.0.1
commands: commands:
abandonclaim: abandonclaim:
description: Deletes a claim. description: Deletes a claim.

View File

@ -554,6 +554,12 @@ public class BlockEventHandler implements Listener
if(!GriefPrevention.instance.config_fireSpreads && igniteEvent.getCause() != IgniteCause.FLINT_AND_STEEL && igniteEvent.getCause() != IgniteCause.LIGHTNING) if(!GriefPrevention.instance.config_fireSpreads && igniteEvent.getCause() != IgniteCause.FLINT_AND_STEEL && igniteEvent.getCause() != IgniteCause.LIGHTNING)
{ {
igniteEvent.setCancelled(true); igniteEvent.setCancelled(true);
Block underBlock = igniteEvent.getBlock().getRelative(BlockFace.DOWN);
if(underBlock.getType() != Material.NETHERRACK)
{
igniteEvent.getBlock().setType(Material.AIR);
}
} }
} }
@ -566,6 +572,13 @@ public class BlockEventHandler implements Listener
if(!GriefPrevention.instance.config_fireSpreads) if(!GriefPrevention.instance.config_fireSpreads)
{ {
spreadEvent.setCancelled(true); spreadEvent.setCancelled(true);
Block underBlock = spreadEvent.getBlock().getRelative(BlockFace.DOWN);
if(underBlock.getType() != Material.NETHERRACK)
{
spreadEvent.getBlock().setType(Material.AIR);
}
return; return;
} }
@ -590,6 +603,13 @@ public class BlockEventHandler implements Listener
if(!GriefPrevention.instance.config_fireDestroys) if(!GriefPrevention.instance.config_fireDestroys)
{ {
burnEvent.setCancelled(true); burnEvent.setCancelled(true);
Block underBlock = burnEvent.getBlock().getRelative(BlockFace.DOWN);
if(underBlock.getType() != Material.NETHERRACK)
{
burnEvent.getBlock().setType(Material.AIR);
}
return; return;
} }

View File

@ -207,7 +207,7 @@ class CleanupUnusedClaimsTask implements Runnable
} }
//unfortunately, java/minecraft don't do a good job of clearing unused memory, leading to out of memory errors from this type of world scanning //unfortunately, java/minecraft don't do a good job of clearing unused memory, leading to out of memory errors from this type of world scanning
if(this.nextClaimIndex % 10 == 0) if(this.nextClaimIndex % 5 == 0)
{ {
System.gc(); System.gc();
} }

View File

@ -1464,7 +1464,10 @@ public class GriefPrevention extends JavaPlugin
//if another player isn't specified, assume current player //if another player isn't specified, assume current player
if(args.length < 1) if(args.length < 1)
{ {
otherPlayer = player; if(player != null)
otherPlayer = player;
else
return false;
} }
//otherwise if no permission to delve into another player's claims data //otherwise if no permission to delve into another player's claims data

View File

@ -62,7 +62,7 @@ class RestoreNatureExecutionTask implements Runnable
Claim cachedClaim = null; Claim cachedClaim = null;
for(int x = 1; x < this.snapshots.length - 1; x++) for(int x = 1; x < this.snapshots.length - 1; x++)
{ {
for(int z = 1; z < this.snapshots[0][0].length; z++) for(int z = 1; z < this.snapshots[0][0].length - 1; z++)
{ {
for(int y = this.miny; y < this.snapshots[0].length; y++) for(int y = this.miny; y < this.snapshots[0].length; y++)
{ {