mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-18 05:16:12 +00:00
Merge branch 'master' of github.com:StevenLawson/TotalFreedomMod
This commit is contained in:
commit
91eae5163d
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user