UltimateKits/src/main/java/com/craftaro/ultimatekits/commands/CommandSettings.java

49 lines
1.3 KiB
Java
Raw Normal View History

2023-07-27 03:28:26 +02:00
package com.craftaro.ultimatekits.commands;
2023-07-27 03:28:26 +02:00
import com.craftaro.core.commands.AbstractCommand;
import com.craftaro.core.configuration.editor.PluginConfigGui;
import com.craftaro.core.gui.GuiManager;
import com.craftaro.ultimatekits.UltimateKits;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
public class CommandSettings extends AbstractCommand {
2020-09-08 17:55:29 +02:00
private final UltimateKits plugin;
private final GuiManager guiManager;
2019-09-12 00:04:29 +02:00
2020-09-08 17:55:29 +02:00
public CommandSettings(UltimateKits plugin, GuiManager guiManager) {
super(CommandType.PLAYER_ONLY, "settings");
this.plugin = plugin;
2019-09-12 00:04:29 +02:00
this.guiManager = guiManager;
}
@Override
2019-09-12 00:04:29 +02:00
protected ReturnType runCommand(CommandSender sender, String... args) {
this.guiManager.showGUI((Player) sender, new PluginConfigGui(this.plugin));
return ReturnType.SUCCESS;
}
@Override
2019-09-12 00:04:29 +02:00
protected List<String> onTab(CommandSender sender, String... args) {
return new ArrayList<>();
}
@Override
public String getPermissionNode() {
return "ultimatekits.admin";
}
@Override
public String getSyntax() {
2020-07-27 19:03:14 +02:00
return "settings";
}
@Override
public String getDescription() {
return "Edit the UltimateKits Settings.";
}
}