Add example command

This commit is contained in:
Taah 2022-03-05 17:25:34 -08:00
parent f64a34a514
commit 17c3f0c6c0
2 changed files with 21 additions and 1 deletions

View File

@ -1,12 +1,13 @@
package dev.plex;
import dev.plex.command.ExampleCommand;
import dev.plex.module.PlexModule;
public class ExampleModule extends PlexModule
{
@Override
public void enable() {
getLogger().info("Test");
registerCommand(new ExampleCommand());
}
@Override

View File

@ -0,0 +1,19 @@
package dev.plex.command;
import dev.plex.command.annotation.CommandParameters;
import dev.plex.command.annotation.CommandPermissions;
import net.kyori.adventure.text.Component;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@CommandParameters(name = "examplemodule")
@CommandPermissions
public class ExampleCommand extends PlexCommand
{
@Override
protected Component execute(@NotNull CommandSender commandSender, @Nullable Player player, @NotNull String[] strings) {
return Component.text("Example module command");
}
}