SteamWar/FightSystem
Archiviert
13
1

less dmg pls
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Zeanon 2022-01-14 17:25:59 +01:00
Ursprung 029f51945e
Commit fc934389ea

Datei anzeigen

@ -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);