From 17698065a0ab081f0b76b5836d216186b3d61c55 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 30 Apr 2020 17:00:35 +0100 Subject: [PATCH] Add extra SpawnReasons to spawn listener --- .../plotsquared/bukkit/listener/PlayerEvents.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java index e4d284f41..d191e1c00 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java @@ -2024,8 +2024,6 @@ public class PlayerEvents extends PlotListener implements Listener { return; } CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason(); - //TODO needs an overhaul for the increased number of spawn reasons added to this event. - //I can't believe they waited so damn long to expand this API set. switch (reason) { case DISPENSE_EGG: case EGG: @@ -2038,6 +2036,16 @@ public class PlayerEvents extends PlotListener implements Listener { break; case REINFORCEMENTS: case NATURAL: + case MOUNT: + case PATROL: + case RAID: + case SHEARED: + case SHOULDER_ENTITY: + case SILVERFISH_BLOCK: + case TRAP: + case VILLAGE_DEFENSE: + case VILLAGE_INVASION: + case BEEHIVE: case CHUNK_GEN: if (!area.isMobSpawning()) { event.setCancelled(true);