This repository has been archived by the owner on Jul 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Auto_register_commands
Leonhard edited this page Sep 16, 2020
·
12 revisions
<dependency>
<groupId>dev.simplix</groupId>
<artifactId>simplixcore-minecraft-bungeecord-dynamiccommands</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>dev.simplix</groupId>
<artifactId>simplixcore-minecraft-spigot-dynamiccommands</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
You need to pass an instance of DynamicCommandsSimplixModule
to the register
method:
SimplixInstaller
.instance()
.register(
ExamplePlugin.class,
new DynamicCommandsSimplixModule());
Now your command will be registered automatically, if it is a component which needs to be bound at DynamicCommandsSimplixModule
. Example:
import dev.simplix.core.common.aop.Component;
import dev.simplix.core.minecraft.bungeecord.dynamiccommands.DynamicCommandsSimplixModule;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.plugin.Command;
@Component(value = DynamicCommandsSimplixModule.class)
public class ExampleCommand extends Command {
public ExampleCommand() {
super("example");
}
@Override
public void execute(CommandSender commandSender, String[] strings) {
//
}
}
2020 - SimplixSoftworks
- Introduction
- Getting started
- Maven Dependencies
- How to use the Dependency-Injection
- Localization
- Listener API
- SQL
- Libraries
- Utilities
- Contribute