From e730507674c3ea84289823083047a0aa21770c60 Mon Sep 17 00:00:00 2001 From: ceze88 Date: Mon, 25 Mar 2024 13:41:14 +0100 Subject: [PATCH] Fix plugin not loading properly if spawner is removed while the plugin was disabled --- .../stackable/spawner/SpawnerStackImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UltimateStacker-Plugin/src/main/java/com.craftaro.ultimatestacker/stackable/spawner/SpawnerStackImpl.java b/UltimateStacker-Plugin/src/main/java/com.craftaro.ultimatestacker/stackable/spawner/SpawnerStackImpl.java index f427d13..3b4a000 100644 --- a/UltimateStacker-Plugin/src/main/java/com.craftaro.ultimatestacker/stackable/spawner/SpawnerStackImpl.java +++ b/UltimateStacker-Plugin/src/main/java/com.craftaro.ultimatestacker/stackable/spawner/SpawnerStackImpl.java @@ -159,6 +159,9 @@ public class SpawnerStackImpl implements SpawnerStack { return null; } CreatureSpawner creatureSpawner = (CreatureSpawner) this.location.getBlock().getState(); + if (creatureSpawner.getSpawnedType() == null) { + return null; + } return Methods.compileSpawnerName(creatureSpawner.getSpawnedType(), this.amount); }