* 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,
LocationSerializable lobbyWarp, LocationSerializable hidersWarp,
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> seekers) {
this.arenaName = arenaName;

View File

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