fixed king of the hill
This commit is contained in:
parent
be727e6e26
commit
8026ad891d
@ -41,7 +41,7 @@ public class HillData
|
||||
|
||||
public boolean isOnHill(Location location, Location eventLocation)
|
||||
{
|
||||
return location.getWorld().equals(eventLocation.getWorld()) && UtilMath.offset(location, eventLocation) <= 36;
|
||||
return location.getWorld().equals(eventLocation.getWorld()) && UtilMath.offset(location, eventLocation.clone().add(0, 12, 0)) <= 7.5;
|
||||
}
|
||||
|
||||
public Location getHillCenter(Location eventLocation)
|
||||
|
@ -114,10 +114,11 @@ public class KingHill extends WorldEvent
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
System.out.println(getCenterLocation());
|
||||
if (_hill.isOnHill(player.getLocation(), getCenterLocation()))
|
||||
{
|
||||
ClanInfo playerClan = _clansManager.getClan(player);
|
||||
if (playerClan != null)
|
||||
if (playerClan != null && !playerClan.equals(lastClan))
|
||||
{
|
||||
clanCount++;
|
||||
lastClan = playerClan;
|
||||
|
Loading…
Reference in New Issue
Block a user