mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 07:34:56 +00:00
Merge branch 'master' of github.com:StevenLawson/TotalFreedomMod
This commit is contained in:
commit
91eae5163d
1 changed files with 29 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue