diff --git a/src/nl/evolutioncoding/areashop/regions/GeneralRegion.java b/src/nl/evolutioncoding/areashop/regions/GeneralRegion.java index c9bcc6c..0f0db9e 100644 --- a/src/nl/evolutioncoding/areashop/regions/GeneralRegion.java +++ b/src/nl/evolutioncoding/areashop/regions/GeneralRegion.java @@ -1922,12 +1922,18 @@ public abstract class GeneralRegion { } // Run player commands if specified String playerPath = "signProfiles." + profile + "." + getState().getValue().toLowerCase() + "." + clickType.getValue() + "Player"; - List playerCommands = plugin.getConfig().getStringList(playerPath); + List playerCommands = new ArrayList(); + for(String command : plugin.getConfig().getStringList(playerPath)) { + playerCommands.add(command.replace(AreaShop.tagClicker, clicker.getName())); + } runCommands(clicker, playerCommands); // Run console commands if specified String consolePath = "signProfiles." + profile + "." + getState().getValue().toLowerCase() + "." + clickType.getValue() + "Console"; - List consoleCommands = plugin.getConfig().getStringList(consolePath); + List consoleCommands = new ArrayList(); + for(String command : plugin.getConfig().getStringList(consolePath)) { + consoleCommands.add(command.replace(AreaShop.tagClicker, clicker.getName())); + } runCommands(Bukkit.getConsoleSender(), consoleCommands); return !playerCommands.isEmpty() || !consoleCommands.isEmpty();