Class FakeCommandRegister
java.lang.Object
net.joseplay.allianceutils.api.extensions.FakeCommandRegister
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterFakeCommand(AllianceCommandExecutor executor, AlliancePlugin extension) Registers a dynamic command and binds it to an AllianceCommandExecutor.voidunregisterFakeCommand(AllianceCommandExecutor executor, AlliancePlugin extension) Unregisters a command and all its aliases from Bukkit.
-
Constructor Details
-
FakeCommandRegister
public FakeCommandRegister()
-
-
Method Details
-
registerFakeCommand
Registers a dynamic command and binds it to an AllianceCommandExecutor.The command is injected into Bukkit at runtime.
Use when: - Loading extensions dynamically Avoid when: - Registering large batches without batching sync (performance issue) Side effects: - Triggers command tree resync (expensive)- Parameters:
executor- command executorextension- owning extension
-
unregisterFakeCommand
Unregisters a command and all its aliases from Bukkit.Directly manipulates knownCommands map.
Use when: - Unloading extensions Avoid when: - You need compatibility across unknown server forks Side effects: - Modifies internal Bukkit structures - Requires syncCommands()- Parameters:
executor- executorextension- owning extension
-