package com.lifeknight.relaymcbungeemain.commands.links; import com.lifeknight.relaymcbungeemain.Main; import com.lifeknight.relayutils.basic.Miscellaneous; import com.lifeknight.relayutils.utilities.ComponentBuilder; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.plugin.Command; import java.util.List; public class HelpCommand extends Command { public HelpCommand() { super ("help", null); } @Override public void execute(CommandSender sender, String[] arguments) { if (!(sender instanceof ProxiedPlayer)) return; List<String> commands = Miscellaneous.getList("play", "hub", "friend", "party", "message", "duel", "profile", "statistics"); ComponentBuilder componentBuilder = new ComponentBuilder(); componentBuilder.gradientLine(ComponentBuilder.BLUE, ComponentBuilder.AQUA_BLUE, ComponentBuilder.BLUE).newLine(); componentBuilder.color(ComponentBuilder.AQUA).append("Some commands to help you get started on Relay:").newLine(); componentBuilder.color(ComponentBuilder.YELLOW); for (String command : commands) { componentBuilder.append(" - /").append(command).newLine(); } componentBuilder.color(ComponentBuilder.GREEN_AQUA).append("For other information, concerning gamemodes, becoming a staff member, partnerships, and the likes, please join our Discord server: "); componentBuilder.link(ChatColor.DARK_PURPLE + ChatColor.UNDERLINE.toString() + "Discord", Main.DISCORD_URL, false).newLine(); componentBuilder.gradientLine(ComponentBuilder.BLUE, ComponentBuilder.AQUA_BLUE, ComponentBuilder.BLUE); sender.sendMessage(componentBuilder.getResult()); } }