Fix: Sign shops no longer temporarily load the chunk when checking if

they are active.
master
blablubbabc 2019-05-28 22:19:42 +02:00
parent f3e9e1f681
commit 3665fddc7d
3 changed files with 3 additions and 3 deletions

View File

@ -52,6 +52,7 @@ Other changes:
* The 'allow-shop' flag got removed from WorldGuard itself and left for other plugins to register it themselves. Shopkeepers will now attempt to register this flag, if no other plugins has registered it yet (one such other plugin is for example ChestShop). Since WorldGuard only allows registering flags before it got enabled, but we are loading the config at a later point, we will always attempt to register the flag, even if the WorldGuard integration is disabled in the config.
* Removed: We no longer check for the alternative 'enable-shop' flag, if the 'allow-shop' flag is not present.
* Fixed a class loading issue in case the WorldGuard integration is enabled but WorldGuard is not present.
* Fix: Sign shops no longer temporarily load the chunk when checking if they are active.
Internal:
* Villagers store their profession under 'profession' now. Previous values under 'prof' get imported.

View File

@ -43,8 +43,6 @@ Low priority:
* Add individual config options for the different editor options?
* Allow changing the editor option button items
* Sign shopkeepers temporarily load the chunk on plugin reloads
# 1.14:
* Allow changing the sign text color?
* Set villager trades and test if they display trade-able items when the player holds corresponding items

View File

@ -130,8 +130,9 @@ public class SKSignShopObject extends AbstractBlockShopObject implements SignSho
public Block getBlock() {
Location signLocation = this.getLocation();
if (signLocation == null) return null; // world not loaded
if (!shopkeeper.getChunkCoords().isChunkLoaded()) return null; // chunk not loaded
Block signBlock = signLocation.getBlock();
if (!ItemUtils.isSign(signBlock.getType())) return null;
if (!ItemUtils.isSign(signBlock.getType())) return null; // not a sign
return signBlock;
}