Fix NPE for removeShop

Former-commit-id: b502aa6f4300a1b93369c04d562736ce9bebd089 [formerly 7334cf384feeb0d99babfb2e88bb8c431bd49309]
Former-commit-id: 46075edcc71293febdba4e16e105a50fcb70cb78
This commit is contained in:
Ghost_chu committed 2019-06-13 10:48:36 +08:00
1 parent 224b407e00
commit 57960aa2b8
1 file changed
+2
@@ -219,6 +219,8 @@ public class ShopManager {
int z = (int) Math.floor((shop.getLocation().getBlockZ()) / 16.0);
ShopChunk shopChunk = new ShopChunk(world, x, z);
HashMap<Location, Shop> inChunk = inWorld.get(shopChunk);
if (inChunk == null || loc == null)
return;
inChunk.remove(loc);
}