From df6ff3f79309111f28fb23e0f25c9bf7375e7242 Mon Sep 17 00:00:00 2001 From: filoghost Date: Tue, 10 Nov 2015 00:12:42 +0100 Subject: [PATCH] Remove permission to bypass economy; it was confusing too many people. --- .../src/com/gmail/filoghost/chestcommands/Permissions.java | 1 - .../filoghost/chestcommands/internal/icon/ExtendedIcon.java | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ChestCommands/src/com/gmail/filoghost/chestcommands/Permissions.java b/ChestCommands/src/com/gmail/filoghost/chestcommands/Permissions.java index 7de8b21..88611ce 100644 --- a/ChestCommands/src/com/gmail/filoghost/chestcommands/Permissions.java +++ b/ChestCommands/src/com/gmail/filoghost/chestcommands/Permissions.java @@ -7,7 +7,6 @@ public class Permissions { UPDATE_NOTIFICATIONS = "chestcommands.update", SEE_ERRORS = "chestcommands.errors", SIGN_CREATE = "chestcommands.sign", - BYPASS_ECONOMY = "chestcommands.economy.bypass", COMMAND_BASE = "chestcommands.command.", OPEN_MENU_BASE = "chestcommands.open."; diff --git a/ChestCommands/src/com/gmail/filoghost/chestcommands/internal/icon/ExtendedIcon.java b/ChestCommands/src/com/gmail/filoghost/chestcommands/internal/icon/ExtendedIcon.java index d2ff9b7..766a7fd 100644 --- a/ChestCommands/src/com/gmail/filoghost/chestcommands/internal/icon/ExtendedIcon.java +++ b/ChestCommands/src/com/gmail/filoghost/chestcommands/internal/icon/ExtendedIcon.java @@ -8,7 +8,6 @@ import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryView; import com.gmail.filoghost.chestcommands.ChestCommands; -import com.gmail.filoghost.chestcommands.Permissions; import com.gmail.filoghost.chestcommands.api.Icon; import com.gmail.filoghost.chestcommands.bridge.EconomyBridge; import com.gmail.filoghost.chestcommands.bridge.PlayerPointsBridge; @@ -161,7 +160,7 @@ public class ExtendedIcon extends Icon { return closeOnClick; } - if (!player.hasPermission(Permissions.BYPASS_ECONOMY) && !EconomyBridge.hasMoney(player, moneyPrice)) { + if (!EconomyBridge.hasMoney(player, moneyPrice)) { player.sendMessage(ChestCommands.getLang().no_money.replace("{money}", EconomyBridge.formatMoney(moneyPrice))); return closeOnClick; } @@ -204,7 +203,7 @@ public class ExtendedIcon extends Icon { boolean changedVariables = false; // To update the placeholders. if (moneyPrice > 0) { - if (!player.hasPermission(Permissions.BYPASS_ECONOMY) && !EconomyBridge.takeMoney(player, moneyPrice)) { + if (!EconomyBridge.takeMoney(player, moneyPrice)) { player.sendMessage(ChatColor.RED + "Error: the transaction couldn't be executed. Please inform the staff."); return closeOnClick; }