Merge branch 'master' of github.com:StevenLawson/TotalFreedomMod

This commit is contained in:
Steven Lawson 2011-10-24 22:10:19 -04:00
commit 91eae5163d

View file

@ -54,7 +54,17 @@ public class TFM_BlockListener extends BlockListener
Location player_pos = p.getLocation();
Location block_pos = event.getBlock().getLocation();
if (player_pos.distance(block_pos) > plugin.nukeMonitorRange)
boolean out_of_range = false;
if (!player_pos.getWorld().equals(block_pos.getWorld()))
{
out_of_range = true;
}
else if (player_pos.distance(block_pos) > plugin.nukeMonitorRange)
{
out_of_range = true;
}
if (out_of_range)
{
playerdata.incrementFreecamDestroyCount();
if (playerdata.getFreecamDestroyCount() > plugin.freecamTriggerCount)
@ -103,7 +113,17 @@ public class TFM_BlockListener extends BlockListener
Location player_pos = p.getLocation();
Location block_pos = event.getBlock().getLocation();
if (player_pos.distance(block_pos) > plugin.nukeMonitorRange)
boolean out_of_range = false;
if (!player_pos.getWorld().equals(block_pos.getWorld()))
{
out_of_range = true;
}
else if (player_pos.distance(block_pos) > plugin.nukeMonitorRange)
{
out_of_range = true;
}
if (out_of_range)
{
playerdata.incrementFreecamPlaceCount();
if (playerdata.getFreecamPlaceCount() > plugin.freecamTriggerCount)