* Fixed bug with allowedCommands.
This commit is contained in:
parent
adf2c14eb1
commit
58d8ca5b0e
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user