#755: Fix NPE when calling getInventory() for virtual EnderChests

This commit is contained in:
SydMontague 2020-09-27 11:47:50 +10:00 committed by md_5
parent 2577f9bfbe
commit a339310c48
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11

View file

@ -18,7 +18,7 @@
+
+ @Override
+ public Location getLocation() {
+ return new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ());
+ return this.a != null ? new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ()) : null;
+ }
- public InventoryEnderChest() {