* Fixed bug with allowedCommands.

This commit is contained in:
Steffion 2013-08-10 20:45:12 +02:00
parent adf2c14eb1
commit 58d8ca5b0e
2 changed files with 5 additions and 3 deletions

View File

@ -45,7 +45,7 @@ public class Arena implements ConfigurationSerializable {
ArrayList<ItemStack> disguiseBlocks, ArrayList<ItemStack> disguiseBlocks,
LocationSerializable lobbyWarp, LocationSerializable hidersWarp, LocationSerializable lobbyWarp, LocationSerializable hidersWarp,
LocationSerializable seekersWarp, List<String> seekersWinCommands, LocationSerializable seekersWarp, List<String> seekersWinCommands,
List<String> allowedCommands, List<String> hidersWinCommands, List<String> hidersWinCommands, List<String> allowedCommands,
List<Player> playersInArena, ArenaState gameState, int timer, List<Player> playersInArena, ArenaState gameState, int timer,
List<Player> seekers) { List<Player> seekers) {
this.arenaName = arenaName; this.arenaName = arenaName;

View File

@ -32,9 +32,11 @@ public class OnPlayerCommandPreprocessEvent implements Listener {
return; return;
} }
if (arena.allowedCommands.contains(m)) { for (String command : arena.allowedCommands) {
if (m.startsWith("/" + command)) {
return; return;
} }
}
MessageM.sendFMessage(player, ConfigC.warning_unableToCommand, MessageM.sendFMessage(player, ConfigC.warning_unableToCommand,
true); true);