Lazy command initialization

This commit is contained in:
boy0001
2015-07-28 01:41:06 +10:00
parent 870495ac1a
commit faf6cbea0f
5 changed files with 18 additions and 11 deletions

View File

@ -613,9 +613,9 @@ import com.intellectualcrafters.plot.uuid.UUIDWrapper;
*/
public void registerCommand(final SubCommand c) {
if (c.getCommand() != null) {
MainCommand.instance.addCommand(c);
MainCommand.getInstance().addCommand(c);
} else {
MainCommand.instance.createCommand(c);
MainCommand.getInstance().createCommand(c);
}
}