Search in sources :

Example 1 with ExpansionDescription

use of com.github.sirblobman.combatlogx.api.expansion.ExpansionDescription in project CombatLogX by SirBlobman.

the class CommandCombatLogXAbout method sendExpansionInformation.

private void sendExpansionInformation(CommandSender sender, Expansion expansion) {
    String name = expansion.getName();
    String prefix = expansion.getPrefix();
    State state = expansion.getState();
    ExpansionDescription information = expansion.getDescription();
    String description = information.getDescription();
    List<String> authorList = information.getAuthors();
    String authorString = String.join(", ", authorList);
    String version = information.getVersion();
    List<String> messageList = new ArrayList<>();
    messageList.add("&f");
    messageList.add("&f&lExpansion Information for &a" + name + "&f&l:");
    messageList.add("&f&lDisplay Name: &7" + prefix);
    messageList.add("&f&lVersion: &7" + version);
    messageList.add("&f&lState: &7" + state);
    messageList.add("&f");
    messageList.add("&f&lDescription: &7" + description);
    messageList.add("&f&lAuthors: &7" + authorString);
    List<String> colorList = MessageUtility.colorList(messageList);
    for (String message : colorList) {
        sender.sendMessage(message);
    }
}
Also used : State(com.github.sirblobman.combatlogx.api.expansion.Expansion.State) ArrayList(java.util.ArrayList) ExpansionDescription(com.github.sirblobman.combatlogx.api.expansion.ExpansionDescription)

Aggregations

State (com.github.sirblobman.combatlogx.api.expansion.Expansion.State)1 ExpansionDescription (com.github.sirblobman.combatlogx.api.expansion.ExpansionDescription)1 ArrayList (java.util.ArrayList)1