Archiviert
13
0

Merge pull request 'Fixing Enderpearls not deleting + Rabbit Exception' (#27) from rabbitos into master

Reviewed-on: #27
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
YoyoNow 2021-04-04 17:19:06 +02:00
Commit 212ee0b106
2 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -111,8 +111,9 @@ public class PlayerSeatListener implements Listener {
public void onEntityDismount(EntityDismountEvent event) { public void onEntityDismount(EntityDismountEvent event) {
seats.remove(getSeatLocation(event.getDismounted().getLocation())); seats.remove(getSeatLocation(event.getDismounted().getLocation()));
if (event.getEntityType() != EntityType.ARROW) if (event.getEntityType() != EntityType.ARROW || event.getEntityType() != EntityType.ENDER_PEARL) {
return; return;
}
event.getDismounted().remove(); event.getDismounted().remove();
} }

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