2019-09-03 22:38:00 +02:00
|
|
|
package com.songoda.ultimatestacker.commands;
|
2018-11-09 22:26:23 +01:00
|
|
|
|
2019-09-03 22:38:00 +02:00
|
|
|
import com.songoda.core.commands.AbstractCommand;
|
|
|
|
import com.songoda.core.configuration.editor.PluginConfigGui;
|
2019-09-07 15:29:24 +02:00
|
|
|
import com.songoda.core.gui.GuiManager;
|
2018-11-09 22:26:23 +01:00
|
|
|
import com.songoda.ultimatestacker.UltimateStacker;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2020-06-28 04:12:13 +02:00
|
|
|
import java.util.Collections;
|
2019-08-19 17:07:10 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2018-11-09 22:26:23 +01:00
|
|
|
public class CommandSettings extends AbstractCommand {
|
|
|
|
|
2019-09-03 22:38:00 +02:00
|
|
|
UltimateStacker instance;
|
2019-09-07 15:29:24 +02:00
|
|
|
GuiManager guiManager;
|
2019-09-03 22:38:00 +02:00
|
|
|
|
2019-09-07 15:29:24 +02:00
|
|
|
public CommandSettings(GuiManager guiManager) {
|
2020-06-28 04:12:13 +02:00
|
|
|
super(CommandType.PLAYER_ONLY, "Settings");
|
2019-09-07 15:29:24 +02:00
|
|
|
this.guiManager = guiManager;
|
2019-09-03 22:38:00 +02:00
|
|
|
instance = UltimateStacker.getInstance();
|
2018-11-09 22:26:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-09-03 22:38:00 +02:00
|
|
|
protected ReturnType runCommand(CommandSender sender, String... args) {
|
2019-09-07 15:29:24 +02:00
|
|
|
guiManager.showGUI((Player) sender, new PluginConfigGui(instance));
|
2018-11-09 22:26:23 +01:00
|
|
|
return ReturnType.SUCCESS;
|
|
|
|
}
|
|
|
|
|
2019-08-19 17:07:10 +02:00
|
|
|
@Override
|
2019-09-03 22:38:00 +02:00
|
|
|
protected List<String> onTab(CommandSender sender, String... args) {
|
2020-06-28 04:12:13 +02:00
|
|
|
return Collections.emptyList();
|
2019-08-19 17:07:10 +02:00
|
|
|
}
|
|
|
|
|
2018-11-09 22:26:23 +01:00
|
|
|
@Override
|
|
|
|
public String getPermissionNode() {
|
2019-05-30 05:47:26 +02:00
|
|
|
return "ultimatestacker.admin";
|
2018-11-09 22:26:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getSyntax() {
|
2020-06-28 04:12:13 +02:00
|
|
|
return "settings";
|
2018-11-09 22:26:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getDescription() {
|
2019-06-02 03:27:51 +02:00
|
|
|
return "Edit the UltimateStacker Settings.";
|
2018-11-09 22:26:23 +01:00
|
|
|
}
|
|
|
|
}
|