From fc934389ea8b788f15c2e7d6785e12559e6dd1bc Mon Sep 17 00:00:00 2001 From: Zeanon Date: Fri, 14 Jan 2022 17:25:59 +0100 Subject: [PATCH] less dmg pls --- .../src/de/steamwar/fightsystem/event/Meteor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/event/Meteor.java b/FightSystem_Core/src/de/steamwar/fightsystem/event/Meteor.java index 4ff55e8..0441763 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/event/Meteor.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/event/Meteor.java @@ -25,6 +25,7 @@ public class Meteor implements Listener { public static final Random random = new Random(); + private final Vector vector = new Vector(0, -1, 0); private final World world = Bukkit.getWorlds().get(0); private final int xLength = Config.RedExtendRegion.getMaxX() - Config.RedExtendRegion.getMinX(); private final int zLength = Config.RedExtendRegion.getMaxZ() - Config.RedExtendRegion.getMinZ(); @@ -48,7 +49,7 @@ public class Meteor implements Listener { public void explode(ProjectileHitEvent event) { if (event.getEntity() instanceof Fireball) { event.getEntity().getWorld().createExplosion(event.getEntity().getLocation(), current.explosionSize); - Bukkit.getScheduler().runTaskTimer(FightSystem.getPlugin(), () -> event.getEntity().getWorld().createExplosion(event.getEntity().getLocation(), current.explosionSize), 0L, 1L); + Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), () -> event.getEntity().getWorld().createExplosion(event.getEntity().getLocation(), current.explosionSize), 1L); } } @@ -61,13 +62,13 @@ public class Meteor implements Listener { Meteor.Point blueStart = new Meteor.Point(Config.BlueExtendRegion.getMinX() + xOffset, Config.BlueExtendRegion.getMaxY() + yOffset, Config.BlueExtendRegion.getMinZ() + zOffset); Fireball fireballRed = world.spawn(redStart.toLocation(world), Fireball.class); - fireballRed.setDirection(new Vector(0, -1, 0)); + fireballRed.setDirection(vector); fireballRed.setBounce(false); fireballRed.setIsIncendiary(false); fireballRed.setYield(0); Fireball fireballBlue = world.spawn(blueStart.toLocation(world), Fireball.class); - fireballBlue.setDirection(new Vector(0, -1, 0)); + fireballBlue.setDirection(vector); fireballBlue.setBounce(false); fireballBlue.setIsIncendiary(false); fireballBlue.setYield(0);