mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 09:07:37 +00:00
Revert radius to distanceSquared
This commit is contained in:
parent
7254097ae4
commit
bee4268d51
@ -39,6 +39,7 @@ public class EntityWipeCMD extends PlexCommand
|
||||
if (radiusSpecified)
|
||||
{
|
||||
radius = parseInt(sender, args[entityWhitelist.size() - 1]); // get the args length as the size of the list
|
||||
radius *= radius;
|
||||
entityWhitelist.remove(entityWhitelist.size() - 1); // remove the radius from the list
|
||||
}
|
||||
|
||||
@ -70,7 +71,7 @@ public class EntityWipeCMD extends PlexCommand
|
||||
if (radius > 0)
|
||||
{
|
||||
PlexLog.debug("we got here, radius is > 0");
|
||||
if (playerSender != null && entity.getWorld() == playerSender.getWorld() && playerSender.getLocation().distance(entity.getLocation()) > radius)
|
||||
if (playerSender != null && entity.getWorld() == playerSender.getWorld() && playerSender.getLocation().distanceSquared(entity.getLocation()) > radius)
|
||||
{
|
||||
PlexLog.debug("continuing");
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user