SteamWar/MissileWars
Archiviert
13
0

Test fix fireball finish

Dieser Commit ist enthalten in:
Lixfel 2020-07-25 10:32:45 +02:00
Ursprung 5aa05458bc
Commit 94bdb14de7

Datei anzeigen

@ -31,13 +31,13 @@ public class PortalDestructListener extends BasicListener {
@EventHandler
public void onExplosion(EntityExplodeEvent e){
System.out.println(e.getEntityType().name());
if(e.getEntityType() != EntityType.FIREBALL)
return;
double z = e.getLocation().getZ();
double distRed = Math.abs(Config.RedPortalZ - z);
double distBlue = Math.abs(Config.BluePortalZ - z);
double distRed = Math.abs(Config.RedPortalZ + 0.5 - z);
double distBlue = Math.abs(Config.BluePortalZ + 0.5 - z);
System.out.println(distBlue + " " + distRed);
if(distRed < 1 || distBlue < 1)
e.setCancelled(true);
}