2023-07-27 03:28:26 +02:00
|
|
|
package com.craftaro.ultimatekits.commands;
|
2018-09-25 04:09:39 +02:00
|
|
|
|
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;
|
2018-09-25 04:09:39 +02:00
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2019-08-06 20:48:28 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
2018-09-25 04:09:39 +02:00
|
|
|
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;
|
2018-09-25 04:09:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-09-12 00:04:29 +02:00
|
|
|
protected ReturnType runCommand(CommandSender sender, String... args) {
|
2023-08-25 12:10:37 +02:00
|
|
|
this.guiManager.showGUI((Player) sender, new PluginConfigGui(this.plugin));
|
2018-09-25 04:09:39 +02:00
|
|
|
return ReturnType.SUCCESS;
|
|
|
|
}
|
|
|
|
|
2019-08-06 20:48:28 +02:00
|
|
|
@Override
|
2019-09-12 00:04:29 +02:00
|
|
|
protected List<String> onTab(CommandSender sender, String... args) {
|
2019-08-06 20:48:28 +02:00
|
|
|
return new ArrayList<>();
|
|
|
|
}
|
|
|
|
|
2018-09-25 04:09:39 +02:00
|
|
|
@Override
|
|
|
|
public String getPermissionNode() {
|
|
|
|
return "ultimatekits.admin";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getSyntax() {
|
2020-07-27 19:03:14 +02:00
|
|
|
return "settings";
|
2018-09-25 04:09:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getDescription() {
|
|
|
|
return "Edit the UltimateKits Settings.";
|
|
|
|
}
|
|
|
|
}
|