From e3952abe6f1b77d31d31c5925bbc0a44082fe1d5 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 3 Apr 2021 23:38:07 +0200 Subject: [PATCH 1/2] Fixing Enderpearls --- src/de/steamwar/lobby/listener/PlayerSeatListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } -- 2.39.5 From 91f58029b82f28f3e8547133d06aa298c21ef9c2 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 4 Apr 2021 17:12:04 +0200 Subject: [PATCH 2/2] Fixing Rabbits --- src/de/steamwar/lobby/listener/RabbitListener.java | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.39.5