mirror of
https://github.com/plexusorg/ExampleModule.git
synced 2024-11-24 05:05:02 +00:00
Add example command
This commit is contained in:
parent
f64a34a514
commit
17c3f0c6c0
@ -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
|
||||
|
19
src/main/java/dev/plex/command/ExampleCommand.java
Normal file
19
src/main/java/dev/plex/command/ExampleCommand.java
Normal 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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user