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

49 lines
1.3 KiB
Java
Raw Normal View History

2019-09-12 00:04:29 +02:00
package com.songoda.ultimatekits.commands;
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;
import com.songoda.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 {
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;
}
@Override
2019-09-12 00:04:29 +02:00
protected ReturnType runCommand(CommandSender sender, String... args) {
guiManager.showGUI((Player) sender, new PluginConfigGui(instance));
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() {
2018-10-26 22:47:40 +02:00
return "/KitAdmin settings";
}
@Override
public String getDescription() {
return "Edit the UltimateKits Settings.";
}
}