diff --git a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java index d48b3bfe5..c8b76769d 100644 --- a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java +++ b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java @@ -300,14 +300,15 @@ public class PlayerListener extends QSListener { if (e.getInventory() == null) { return; } - if (e.getInventory().getLocation() == null) { - return; - } location = e.getInventory().getLocation(); - if (location == null) { return; /// ignored as workaround, GH-303 } + //Cannot tick distance manager while unloading playerchunks + //https://github.com/pl3xgaming/Purpur/issues/631 + if (!Util.isLoaded(location)) { + return; + } final Shop shop = plugin.getShopManager().getShopIncludeAttached(location); if (shop != null) { shop.setSignText();