Merge pull request #921 from dxminic/fix/wither-in-mob-repellator

fix: allow for event cancelling when a wither is constructed
This commit is contained in:
okx-code
2026-05-05 18:34:06 +01:00
committed by GitHub

View File

@@ -36,7 +36,7 @@ public class MobListener implements Listener {
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void on(CreatureSpawnEvent event) {
if (event.getSpawnReason() != CreatureSpawnEvent.SpawnReason.NATURAL) {
if (event.getSpawnReason() != CreatureSpawnEvent.SpawnReason.NATURAL && event.getSpawnReason() != CreatureSpawnEvent.SpawnReason.BUILD_WITHER) {
return;
}
if (!(event.getEntity() instanceof Monster)) {