diff --git a/src/de/steamwar/misslewars/listener/PortalDestructListener.java b/src/de/steamwar/misslewars/listener/PortalDestructListener.java index 6e032fc..d9dcf9f 100644 --- a/src/de/steamwar/misslewars/listener/PortalDestructListener.java +++ b/src/de/steamwar/misslewars/listener/PortalDestructListener.java @@ -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); }