mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-08 19:51:05 +00:00
Fixed crashes and errors ("Asynchronous entity track")
Fixes #109 (Hopefully) Fixes #110 (Hopefully)
This commit is contained in:
parent
0ad435b266
commit
bbd0046ed1
@ -35,7 +35,10 @@ public class ShopUtils {
|
|||||||
* @return Shop at the given location or <b>null</b> if no shop is found there
|
* @return Shop at the given location or <b>null</b> if no shop is found there
|
||||||
*/
|
*/
|
||||||
public Shop getShop(Location location) {
|
public Shop getShop(Location location) {
|
||||||
return shopLocation.get(location.getBlock().getLocation());
|
Location newLocation = new Location(location.getWorld(), location.getBlockX(),
|
||||||
|
location.getBlockY(), location.getBlockZ());
|
||||||
|
|
||||||
|
return shopLocation.get(newLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,7 +47,7 @@ public class ShopUtils {
|
|||||||
* @return Whether there is a shop at the given location
|
* @return Whether there is a shop at the given location
|
||||||
*/
|
*/
|
||||||
public boolean isShop(Location location) {
|
public boolean isShop(Location location) {
|
||||||
return shopLocation.containsKey(location.getBlock().getLocation());
|
return getShop(location) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user