mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2024-11-26 01:05:12 +01:00
parent
00323510bb
commit
e29da1279b
@ -233,7 +233,16 @@ public class ShopUtils {
|
||||
if (plugin.getShopChestConfig().only_show_shops_in_sight) {
|
||||
HashSet<Material> transparent = new HashSet<>();
|
||||
transparent.add(Material.AIR);
|
||||
List<Block> sight = player.getLineOfSight(transparent, (int) plugin.getShopChestConfig().maximal_distance);
|
||||
|
||||
List<Block> sight;
|
||||
|
||||
try {
|
||||
sight = player.getLineOfSight(transparent, (int) plugin.getShopChestConfig().maximal_distance);
|
||||
} catch (IllegalStateException e) {
|
||||
// This method is occasionally throwing this exception but the exact reason is unknown...
|
||||
plugin.debug("Failed to get line of sight: " + e.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList<Shop> shopsInSight = new ArrayList<>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user