mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2024-11-14 23:15:10 +01:00
Fix shop updater (#236)
This commit is contained in:
parent
6ae12f65c0
commit
e532e9c095
@ -380,9 +380,11 @@ public class ShopUtils {
|
||||
double holoDistSqr = Math.pow(Config.maximalDistance, 2);
|
||||
double itemDistSqr = Math.pow(Config.maximalItemDistance, 2);
|
||||
|
||||
Location playerLocation = p.getLocation();
|
||||
|
||||
for (Shop shop : getShops()) {
|
||||
if (p.getLocation().getWorld().getName().equals(shop.getLocation().getWorld().getName())) {
|
||||
double distSqr = shop.getLocation().distanceSquared(p.getLocation());
|
||||
if (playerLocation.getWorld().getName().equals(shop.getLocation().getWorld().getName())) {
|
||||
double distSqr = shop.getLocation().distanceSquared(playerLocation);
|
||||
|
||||
if (shop.hasHologram()) {
|
||||
if (distSqr <= holoDistSqr) {
|
||||
|
Loading…
Reference in New Issue
Block a user