This commit is contained in:
Steven Lawson 2011-10-24 20:00:48 -04:00
parent 35821a75c9
commit 4d7b646f3d
2 changed files with 30 additions and 10 deletions

View File

@ -54,7 +54,17 @@ public class TFM_BlockListener extends BlockListener
Location player_pos = p.getLocation(); Location player_pos = p.getLocation();
Location block_pos = event.getBlock().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(); playerdata.incrementFreecamDestroyCount();
if (playerdata.getFreecamDestroyCount() > plugin.freecamTriggerCount) if (playerdata.getFreecamDestroyCount() > plugin.freecamTriggerCount)
@ -103,7 +113,17 @@ public class TFM_BlockListener extends BlockListener
Location player_pos = p.getLocation(); Location player_pos = p.getLocation();
Location block_pos = event.getBlock().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(); playerdata.incrementFreecamPlaceCount();
if (playerdata.getFreecamPlaceCount() > plugin.freecamTriggerCount) if (playerdata.getFreecamPlaceCount() > plugin.freecamTriggerCount)

View File

@ -344,7 +344,7 @@ public class TFM_PlayerListener extends PlayerListener
} }
else else
{ {
TFM_Util.bcastMsg(p.getName() + " is a verified superadmin.", ChatColor.GREEN); //TFM_Util.bcastMsg(p.getName() + " is a verified superadmin.", ChatColor.GREEN);
} }
} }
} }