Fix an NPE issue, unload when actually loaded

This commit is contained in:
sandtechnology committed 2021-08-11 01:53:56 +08:00
1 parent e59e02ef1f
commit ca35ea4fb3
1 file changed
+1 -1
@@ -297,7 +297,7 @@ public class VirtualDisplayItem extends DisplayItem {
public static void unload() {
Util.debugLog("Unloading VirtualDisplayItem chunks mapping manager...");
if (!loaded.get()) {
if (loaded.get()) {
Util.debugLog("Unregistering the packet listener...");
protocolManager.removePacketListener(packetAdapter);
loaded.set(false);