From 94011c997d8167fc9a8413d47d4a13ae08c2834f Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 6 Sep 2016 11:46:24 +0200 Subject: [PATCH] Improved illogical condition whether buying/selling is enabled --- src/main/java/de/epiceric/shopchest/ShopCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/epiceric/shopchest/ShopCommand.java b/src/main/java/de/epiceric/shopchest/ShopCommand.java index 7ee6d3f..e4e4fa5 100644 --- a/src/main/java/de/epiceric/shopchest/ShopCommand.java +++ b/src/main/java/de/epiceric/shopchest/ShopCommand.java @@ -273,7 +273,8 @@ class ShopCommand extends BukkitCommand { plugin.debug(p.getName() + " has entered the numbers correctly (according to allow-decimals configuration)"); - boolean buyEnabled = !(buyPrice <= 0), sellEnabled = !(sellPrice <= 0); + boolean buyEnabled = buyPrice > 0; + boolean sellEnabled = sellPrice > 0; if (!buyEnabled && !sellEnabled) { p.sendMessage(LanguageUtils.getMessage(LocalizedMessage.Message.BUY_SELL_DISABLED));