Merge pull request #19 from Aiquen/master

Added an option to toggle the right-sign-click chest-open feature.
This commit is contained in:
Andrzej Pomirski 2012-04-07 03:42:06 -07:00
commit 12cc59aa35
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ public enum Property {
HEROES_EXP(100, "How much Heroes exp should people get for creating a ChestShop?"),
BLOCK_UPDATE(false, "EXPERIMENTAL: Should every ChestShop transaction result in a block update?"),
ALLOW_PARTIAL_TRANSACTIONS(true, "Can shops be used even when the seller doesn't have enough items? (The price will be scaled adequatly to the item amount)");
ALLOW_SIGN_CHEST_OPEN(true, "Can shop's chest be opened by owner with right-clicking a shop's sign?");
private final Object value;

View File

@ -64,7 +64,7 @@ public class playerInteract implements Listener {
if (action == Action.RIGHT_CLICK_BLOCK) event.setCancelled(true);
if (uSign.canAccess(player, sign)) {
if (Config.getBoolean(Property.ALLOW_SIGN_CHEST_OPEN) && uSign.canAccess(player, sign)) {
if (action != Action.LEFT_CLICK_BLOCK || !Config.getBoolean(Property.ALLOW_LEFT_CLICK_DESTROYING)) showChestGUI(player, block);
return;
}