fixed king of the hill

This commit is contained in:
NewGarbo 2015-11-29 21:09:18 +00:00
parent be727e6e26
commit 8026ad891d
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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;