Archiviert
13
0
Dieser Commit ist enthalten in:
Chaoscaot 2021-04-04 17:12:04 +02:00
Ursprung e3952abe6f
Commit 91f58029b8

Datei anzeigen

@ -42,6 +42,9 @@ public class RabbitListener implements Listener {
World world = Bukkit.getWorlds().get(0); World world = Bukkit.getWorlds().get(0);
spreadRabbits(250, world); spreadRabbits(250, world);
Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> { Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> {
if(Bukkit.getOnlinePlayers().isEmpty()) {
return;
}
Rabbit rabbit = world.getEntitiesByClass(Rabbit.class).iterator().next(); Rabbit rabbit = world.getEntitiesByClass(Rabbit.class).iterator().next();
world.spawn(rabbit.getLocation(), Firework.class, firework -> { world.spawn(rabbit.getLocation(), Firework.class, firework -> {
FireworkMeta meta = firework.getFireworkMeta(); FireworkMeta meta = firework.getFireworkMeta();