Dieser Commit ist enthalten in:
Ursprung
029f51945e
Commit
fc934389ea
@ -25,6 +25,7 @@ public class Meteor implements Listener {
|
|||||||
|
|
||||||
public static final Random random = new Random();
|
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 World world = Bukkit.getWorlds().get(0);
|
||||||
private final int xLength = Config.RedExtendRegion.getMaxX() - Config.RedExtendRegion.getMinX();
|
private final int xLength = Config.RedExtendRegion.getMaxX() - Config.RedExtendRegion.getMinX();
|
||||||
private final int zLength = Config.RedExtendRegion.getMaxZ() - Config.RedExtendRegion.getMinZ();
|
private final int zLength = Config.RedExtendRegion.getMaxZ() - Config.RedExtendRegion.getMinZ();
|
||||||
@ -48,7 +49,7 @@ public class Meteor implements Listener {
|
|||||||
public void explode(ProjectileHitEvent event) {
|
public void explode(ProjectileHitEvent event) {
|
||||||
if (event.getEntity() instanceof Fireball) {
|
if (event.getEntity() instanceof Fireball) {
|
||||||
event.getEntity().getWorld().createExplosion(event.getEntity().getLocation(), current.explosionSize);
|
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);
|
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);
|
Fireball fireballRed = world.spawn(redStart.toLocation(world), Fireball.class);
|
||||||
fireballRed.setDirection(new Vector(0, -1, 0));
|
fireballRed.setDirection(vector);
|
||||||
fireballRed.setBounce(false);
|
fireballRed.setBounce(false);
|
||||||
fireballRed.setIsIncendiary(false);
|
fireballRed.setIsIncendiary(false);
|
||||||
fireballRed.setYield(0);
|
fireballRed.setYield(0);
|
||||||
|
|
||||||
Fireball fireballBlue = world.spawn(blueStart.toLocation(world), Fireball.class);
|
Fireball fireballBlue = world.spawn(blueStart.toLocation(world), Fireball.class);
|
||||||
fireballBlue.setDirection(new Vector(0, -1, 0));
|
fireballBlue.setDirection(vector);
|
||||||
fireballBlue.setBounce(false);
|
fireballBlue.setBounce(false);
|
||||||
fireballBlue.setIsIncendiary(false);
|
fireballBlue.setIsIncendiary(false);
|
||||||
fireballBlue.setYield(0);
|
fireballBlue.setYield(0);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren