Fix for cannot tick distance manager while unloading playerchunks

This commit is contained in:
sandtechnology committed 2021-08-30 21:41:48 +08:00
1 parent 8fe98906d1
commit 642e6fe405
1 file changed
+5 -4
@@ -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();