mirror of
https://github.com/plexusorg/ExampleModule.git
synced 2024-12-29 11:32:36 +00:00
Add more detail to annotations
This commit is contained in:
parent
267c4ed5f6
commit
e3d4fa6102
2 changed files with 9 additions and 6 deletions
|
@ -6,12 +6,13 @@ import dev.plex.module.PlexModule;
|
||||||
public class ExampleModule extends PlexModule
|
public class ExampleModule extends PlexModule
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void enable() {
|
public void enable()
|
||||||
|
{
|
||||||
registerCommand(new ExampleCommand());
|
registerCommand(new ExampleCommand());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disable() {
|
public void disable()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,18 +2,20 @@ package dev.plex.command;
|
||||||
|
|
||||||
import dev.plex.command.annotation.CommandParameters;
|
import dev.plex.command.annotation.CommandParameters;
|
||||||
import dev.plex.command.annotation.CommandPermissions;
|
import dev.plex.command.annotation.CommandPermissions;
|
||||||
|
import dev.plex.rank.enums.Rank;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@CommandParameters(name = "examplemodule")
|
@CommandParameters(name = "examplemodule", description = "An example command provided by Plex's example module")
|
||||||
@CommandPermissions
|
@CommandPermissions(level = Rank.OP, permission = "plex.module.command")
|
||||||
public class ExampleCommand extends PlexCommand
|
public class ExampleCommand extends PlexCommand
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
protected Component execute(@NotNull CommandSender commandSender, @Nullable Player player, @NotNull String[] strings) {
|
protected Component execute(@NotNull CommandSender commandSender, @Nullable Player player, @NotNull String[] strings)
|
||||||
|
{
|
||||||
return Component.text("Example module command");
|
return Component.text("Example module command");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue