Fix NPE on plugin reload

This commit is contained in:
ceze88 2023-04-07 21:43:39 +02:00
parent 88a5df4fec
commit 732062fb61
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ public class SpawnerListeners implements Listener {
@EventHandler
public void onSpawn(SpawnerSpawnEvent event) {
if (plugin.getStackingTask() == null) return; //Don't spam error when reloading the plugin
if (!Settings.STACK_ENTITIES.getBoolean()
|| !plugin.spawnersEnabled()
|| plugin.getStackingTask().isWorldDisabled(event.getLocation().getWorld())) return;