diff --git a/src/de/steamwar/lobby/listener/PlayerSeatListener.java b/src/de/steamwar/lobby/listener/PlayerSeatListener.java index 025e316..1e19d22 100644 --- a/src/de/steamwar/lobby/listener/PlayerSeatListener.java +++ b/src/de/steamwar/lobby/listener/PlayerSeatListener.java @@ -111,8 +111,9 @@ public class PlayerSeatListener implements Listener { public void onEntityDismount(EntityDismountEvent event) { seats.remove(getSeatLocation(event.getDismounted().getLocation())); - if (event.getEntityType() != EntityType.ARROW) + if (event.getEntityType() != EntityType.ARROW || event.getEntityType() != EntityType.ENDER_PEARL) { return; + } event.getDismounted().remove(); } diff --git a/src/de/steamwar/lobby/listener/RabbitListener.java b/src/de/steamwar/lobby/listener/RabbitListener.java index 2a420a2..6d5f38b 100644 --- a/src/de/steamwar/lobby/listener/RabbitListener.java +++ b/src/de/steamwar/lobby/listener/RabbitListener.java @@ -42,6 +42,9 @@ public class RabbitListener implements Listener { World world = Bukkit.getWorlds().get(0); spreadRabbits(250, world); Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> { + if(Bukkit.getOnlinePlayers().isEmpty()) { + return; + } Rabbit rabbit = world.getEntitiesByClass(Rabbit.class).iterator().next(); world.spawn(rabbit.getLocation(), Firework.class, firework -> { FireworkMeta meta = firework.getFireworkMeta();