mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-22 23:01:20 +01:00
Merge pull request #19 from Aiquen/master
Added an option to toggle the right-sign-click chest-open feature.
This commit is contained in:
commit
12cc59aa35
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user