return new String[]{"Lists all wrapper and their status."};
}
@Override
public void executeCommand(ICommandSender sender, String[] args) {
MorePageDisplay display = new MorePageDisplay(new String[]{"|< Wrapper status - Page: %/$ >|"}, sender);
for(AbstractWrapper controller:LogisticsWrapperHandler.wrapperController) {
StringBuilder builder = new StringBuilder();
builder.append(ChatColor.AQUA);
builder.append(controller.getName());
builder.append(controller.getTypeName());
builder.append(": ");
if(controller.getState() == WrapperState.Enabled) {
builder.append(ChatColor.GREEN);
builder.append("enabled");
} else if (controller.getState() == WrapperState.ModMissing) {
builder.append(ChatColor.GRAY);
builder.append("disabled (mod not found)");
} else if(controller.getState() == WrapperState.Exception) {
builder.append(ChatColor.RED);
builder.append("disabled (exception)");
} else {
builder.append(ChatColor.BLUE);
builder.append("disabled (" + controller.getReason() + ")");
}
display.append(builder.toString());
}
display.display(sender);
}