Redo the logic of SG's anti deathmatch camping
This commit is contained in:
parent
155fabb9e9
commit
046fc30e0e
@ -11,6 +11,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -131,7 +132,14 @@ public class BorderModule extends Module
|
||||
return;
|
||||
}
|
||||
|
||||
double maxY = getGame().GetSpectatorLocation().getY() - 6;
|
||||
Location center = UtilAlg.getAverageLocation(getGame().GetTeamList().get(0).GetSpawns());
|
||||
|
||||
if (center == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
double maxY = center.getY() + 6;
|
||||
|
||||
for (Player player : getGame().GetPlayers(true))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user