Reimplement (sorta) dynamic command registration

It still only works with tab-completion if the aliases have been set /before/ starup, but otherwise it works.
This commit is contained in:
Magnus Ulf 2019-01-24 19:00:58 +01:00
parent d3a70e173b
commit a74b5a9d35
2 changed files with 2 additions and 7 deletions

View File

@ -6,13 +6,6 @@ description: ${project.description}
authors: [Madus, Cayorion, Ulumulu1510] authors: [Madus, Cayorion, Ulumulu1510]
load: startup load: startup
api-version: 1.13 api-version: 1.13
commands:
mcore:
description: MassiveCore basecommand
permission: massivecore.basecommand
massivecore:
description: MassiveCore basecommand
permission: massivecore.basecommand
permissions: permissions:
# -------------------------------------------- # # -------------------------------------------- #
# THE REAL NODES # THE REAL NODES

View File

@ -4,6 +4,7 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.MassiveCommand;
import com.massivecraft.massivecore.engine.EngineMassiveCoreCommandRegistration;
import com.massivecraft.massivecore.mixin.Mixin; import com.massivecraft.massivecore.mixin.Mixin;
import com.massivecraft.massivecore.mixin.MixinMessage; import com.massivecraft.massivecore.mixin.MixinMessage;
import com.massivecraft.massivecore.predicate.Predicate; import com.massivecraft.massivecore.predicate.Predicate;
@ -165,6 +166,7 @@ public abstract class MassivePlugin extends JavaPlugin implements Listener, Name
} }
long ms = System.currentTimeMillis() - this.enableTime; long ms = System.currentTimeMillis() - this.enableTime;
EngineMassiveCoreCommandRegistration.get().run();
log(Txt.parse("=== ENABLE <g>COMPLETE <i>(Took <h>" + ms + "ms<i>) ===")); log(Txt.parse("=== ENABLE <g>COMPLETE <i>(Took <h>" + ms + "ms<i>) ==="));
} }