fix NullPointerException...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-08-22 15:34:35 +08:00
parent c1cf312381
commit bcf3a0e68e
2 changed files with 4 additions and 3 deletions

View File

@ -19,7 +19,8 @@ public class Yum extends JavaPlugin {
@Override
public void onEnable() {
download = new DownloadManager(this);
this.getCommand("yum").setExecutor(new CommandHandler(this));
this.getCommand("yum").setTabCompleter(new CommandHandler(this));
CommandHandler cmdhandler = new CommandHandler(this);
this.getCommand("yum").setExecutor(cmdhandler);
this.getCommand("yum").setTabCompleter(cmdhandler);
}
}

View File

@ -32,7 +32,7 @@ public class CommandHandler implements CommandExecutor, TabCompleter {
/**
* 命令监听类列表
*/
private List<BaseCommand> commandlist;
private List<BaseCommand> commandlist = new ArrayList<BaseCommand>();;
/**
* 插件主类
*/