Increase default nuking block place threshold. Resolves #169

This commit is contained in:
unknown 2014-05-11 18:05:51 +02:00
parent 5c99aa9a44
commit a3f3903760
3 changed files with 11 additions and 11 deletions

View file

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Mon May 05 16:09:04 CEST 2014
build.number=824
#Sun May 11 18:05:04 CEST 2014
build.number=826

View file

@ -95,7 +95,7 @@ auto_wipe: true
nukemonitor:
enabled: true
count_break: 100
count_place: 25
count_place: 40
range: 10.0
freecam_trigger_count: 10

View file

@ -35,23 +35,23 @@ public class TFM_BlockListener implements Listener
@EventHandler(priority = EventPriority.NORMAL)
public void onBlockBreak(BlockBreakEvent event)
{
Player player = event.getPlayer();
Location blockLocation = event.getBlock().getLocation();
final Player player = event.getPlayer();
final Location location = event.getBlock().getLocation();
if (TFM_ConfigEntry.NUKE_MONITOR_ENABLED.getBoolean())
{
TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);
final TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);
Location playerLocation = player.getLocation();
final Location playerLocation = player.getLocation();
final double nukeMonitorRange = TFM_ConfigEntry.NUKE_MONITOR_RANGE.getDouble().doubleValue();
boolean outOfRange = false;
if (!playerLocation.getWorld().equals(blockLocation.getWorld()))
if (!playerLocation.getWorld().equals(location.getWorld()))
{
outOfRange = true;
}
else if (playerLocation.distanceSquared(blockLocation) > (nukeMonitorRange * nukeMonitorRange))
else if (playerLocation.distanceSquared(location) > (nukeMonitorRange * nukeMonitorRange))
{
outOfRange = true;
}
@ -70,7 +70,7 @@ public class TFM_BlockListener implements Listener
}
}
Long lastRan = TFM_Heartbeat.getLastRan();
final Long lastRan = TFM_Heartbeat.getLastRan();
if (lastRan == null || lastRan + TotalFreedomMod.HEARTBEAT_RATE * 1000L < System.currentTimeMillis())
{
// TFM_Log.warning("Heartbeat service timeout - can't check block place/break rates.");
@ -94,7 +94,7 @@ public class TFM_BlockListener implements Listener
{
if (!TFM_AdminList.isSuperAdmin(player))
{
if (TFM_ProtectedArea.isInProtectedArea(blockLocation))
if (TFM_ProtectedArea.isInProtectedArea(location))
{
event.setCancelled(true);
}