SteamWar/MissileWars
Archiviert
13
0

Fix walking to enemy

Dieser Commit ist enthalten in:
Lixfel 2020-07-04 08:43:53 +02:00
Ursprung 7fac01c8ab
Commit 5081d1f9a5

Datei anzeigen

@ -13,6 +13,7 @@ import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerPickupArrowEvent;
import java.util.EnumSet;
import java.util.Objects;
public class ArenaListener extends BasicListener {
@ -27,8 +28,10 @@ public class ArenaListener extends BasicListener {
assert location != null;
if(location.getY() < Config.ArenaMinY){
if(p.getGameMode() == GameMode.SPECTATOR || MissileWars.getFightState() == FightState.WAITING)
if(p.getGameMode() == GameMode.SPECTATOR)
p.teleport(e.getFrom());
else if(MissileWars.getFightState() == FightState.WAITING)
p.teleport(Objects.requireNonNull(MissileWars.getTeam(p)).getSpawn());
else
p.damage(20.0f);
}else if(