From 7aec09de1b6462415d644e41f3a9268f82100250 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Wed, 10 May 2023 22:27:18 +0200 Subject: [PATCH] Fix error on shutdown if command manager was not initialized --- Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java index d4ec43c..1fe3590 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java @@ -243,7 +243,7 @@ private void unload() inventoryClearCommand = null; } if(collector != null) collector.close(); - commandManager.close(); + if(commandManager != null) commandManager.close(); if(collector != null) collector.cancel(); if(database != null) database.close(); // Close the DB connection, we won't need them any longer HandlerList.unregisterAll(this); // Stop the listeners