2019-09-12 00:04:29 +02:00
|
|
|
package com.songoda.ultimatekits.commands;
|
2018-09-25 04:09:39 +02:00
|
|
|
|
2019-09-12 00:04:29 +02:00
|
|
|
import com.songoda.core.commands.AbstractCommand;
|
|
|
|
import com.songoda.core.configuration.editor.PluginConfigGui;
|
|
|
|
import com.songoda.core.gui.GuiManager;
|
2018-09-25 04:09:39 +02:00
|
|
|
import com.songoda.ultimatekits.UltimateKits;
|
|
|
|
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 {
|
|
|
|
|
2019-09-12 00:04:29 +02:00
|
|
|
final UltimateKits instance = UltimateKits.getInstance();
|
|
|
|
final GuiManager guiManager;
|
|
|
|
|
|
|
|
public CommandSettings(GuiManager guiManager) {
|
|
|
|
super(true, "settings");
|
|
|
|
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) {
|
|
|
|
guiManager.showGUI((Player) sender, new PluginConfigGui(instance));
|
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() {
|
2018-10-26 22:47:40 +02:00
|
|
|
return "/KitAdmin settings";
|
2018-09-25 04:09:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getDescription() {
|
|
|
|
return "Edit the UltimateKits Settings.";
|
|
|
|
}
|
|
|
|
}
|