fix NullPointerException...

Signed-off-by: 502647092 <jtb1@163.com>
dev
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 @Override
public void onEnable() { public void onEnable() {
download = new DownloadManager(this); download = new DownloadManager(this);
this.getCommand("yum").setExecutor(new CommandHandler(this)); CommandHandler cmdhandler = new CommandHandler(this);
this.getCommand("yum").setTabCompleter(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>();;
/** /**
* *
*/ */