mirror of
https://github.com/EpicEricEE/ShopChest.git
synced 2024-11-23 19:16:41 +01:00
Fixed error message in console after teleporting
p.getWorld() does not return the right world when the process of teleporting has not yet finished. We need to use the world of the passed location object, which in the PlayerTeleportEvent is e.getTo()
This commit is contained in:
parent
e94463ccbe
commit
c8f4e8980e
@ -64,7 +64,7 @@ public class ShopItemListener implements Listener {
|
||||
|
||||
double itemDistanceSquared = plugin.getShopChestConfig().maximal_item_distance;
|
||||
itemDistanceSquared *= itemDistanceSquared;
|
||||
World w = p.getWorld();
|
||||
World w = playerLocation.getWorld();
|
||||
|
||||
for (Shop shop : shopUtils.getShops()) {
|
||||
Location shopLocation = shop.getLocation();
|
||||
|
Loading…
Reference in New Issue
Block a user