2019-10-19 19:29:46 +02:00
|
|
|
package com.songoda.ultimatemoderation.commands;
|
2019-02-27 02:50:18 +01:00
|
|
|
|
2023-07-20 17:41:31 +02:00
|
|
|
import com.craftaro.core.commands.AbstractCommand;
|
2019-02-27 02:50:18 +01:00
|
|
|
import com.songoda.ultimatemoderation.UltimateModeration;
|
2020-08-05 00:20:25 +02:00
|
|
|
import com.songoda.ultimatemoderation.gui.MainGui;
|
2019-02-27 02:50:18 +01:00
|
|
|
import org.bukkit.command.CommandSender;
|
2019-03-03 22:33:44 +01:00
|
|
|
import org.bukkit.entity.Player;
|
2019-02-27 02:50:18 +01:00
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class CommandUltimateModeration extends AbstractCommand {
|
2020-09-08 22:51:25 +02:00
|
|
|
private final UltimateModeration plugin;
|
2019-10-19 19:29:46 +02:00
|
|
|
|
2020-09-08 22:51:25 +02:00
|
|
|
public CommandUltimateModeration(UltimateModeration plugin) {
|
2019-10-19 19:29:46 +02:00
|
|
|
super(CommandType.PLAYER_ONLY, "UltimateModeration");
|
2020-09-08 22:51:25 +02:00
|
|
|
this.plugin = plugin;
|
2019-02-27 02:50:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-10-19 19:29:46 +02:00
|
|
|
protected ReturnType runCommand(CommandSender sender, String... args) {
|
2023-07-20 17:32:46 +02:00
|
|
|
this.plugin.getGuiManager().showGUI((Player) sender, new MainGui(this.plugin, (Player) sender));
|
2019-02-27 02:50:18 +01:00
|
|
|
return ReturnType.SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-10-19 19:29:46 +02:00
|
|
|
protected List<String> onTab(CommandSender sender, String... args) {
|
2019-02-27 02:50:18 +01:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getPermissionNode() {
|
2019-03-03 22:33:44 +01:00
|
|
|
return "um.moderate";
|
2019-02-27 02:50:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getSyntax() {
|
|
|
|
return "/um";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getDescription() {
|
2020-08-05 00:20:25 +02:00
|
|
|
return "Displays the moderation panel.";
|
2019-02-27 02:50:18 +01:00
|
|
|
}
|
|
|
|
}
|