Fix for Bukkit "unknown command" error when using console commands

handling for extra commas in "baseCommandAliases" in conf.json adding null values
This commit is contained in:
Brettflan
2011-10-16 04:02:29 -05:00
parent 61bd37c99b
commit f5450886f1
3 changed files with 23 additions and 2 deletions

View File

@ -1,5 +1,7 @@
package com.massivecraft.factions.cmd;
import java.util.Collections;
import com.massivecraft.factions.Conf;
public class FCmdRoot extends FCommand
@ -55,6 +57,7 @@ public class FCmdRoot extends FCommand
{
super();
this.aliases.addAll(Conf.baseCommandAliases);
this.aliases.removeAll(Collections.singletonList(null)); // remove any nulls from extra commas
this.allowNoSlashAccess = Conf.allowNoSlashCommand;
//this.requiredArgs.add("");