ExcellentEnchants-spigot/Core/src/main/java/su/nightexpress/excellentenchants/command/ListCommand.java

25 lines
943 B
Java
Raw Normal View History

2024-02-05 00:26:03 +01:00
package su.nightexpress.excellentenchants.command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
2024-03-24 13:11:31 +01:00
import su.nightexpress.excellentenchants.ExcellentEnchantsPlugin;
2024-02-05 00:26:03 +01:00
import su.nightexpress.excellentenchants.Perms;
import su.nightexpress.excellentenchants.config.Lang;
2024-03-24 13:11:31 +01:00
import su.nightexpress.nightcore.command.CommandResult;
import su.nightexpress.nightcore.command.impl.AbstractCommand;
2024-02-05 00:26:03 +01:00
2024-03-24 13:11:31 +01:00
public class ListCommand extends AbstractCommand<ExcellentEnchantsPlugin> {
2024-02-05 00:26:03 +01:00
2024-03-24 13:11:31 +01:00
public ListCommand(@NotNull ExcellentEnchantsPlugin plugin) {
2024-02-05 00:26:03 +01:00
super(plugin, new String[]{"list"}, Perms.COMMAND_LIST);
2024-03-24 13:11:31 +01:00
this.setDescription(Lang.COMMAND_LIST_DESC);
2024-02-05 00:26:03 +01:00
this.setPlayerOnly(true);
}
@Override
protected void onExecute(@NotNull CommandSender sender, @NotNull CommandResult result) {
2024-03-24 13:11:31 +01:00
plugin.getEnchantManager().openEnchantsMenu((Player) sender);
2024-02-05 00:26:03 +01:00
}
}