mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-23 02:25:26 +01:00
Remove permission to bypass economy; it was confusing too many people.
This commit is contained in:
parent
6bb6199d6d
commit
df6ff3f793
@ -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.";
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user