Readded the description in CatalogEntry

This commit is contained in:
Florian CUNY 2019-06-09 09:07:18 +02:00
parent 870bdcb9f8
commit 2340b1991c
2 changed files with 8 additions and 1 deletions

View File

@ -91,7 +91,7 @@ public class CatalogPanel {
itemBuilder.description(user.getTranslation(LOCALE_REF + "icon.description-template",
"[topic]", StringUtils.capitalize(addon.getTopic()),
"[install]", install,
"[description]", "WIP"));
"[description]", addon.getDescription()));
// Send the link to the releases tab on click
itemBuilder.clickHandler((panel, user1, clickType, slot) -> {

View File

@ -20,6 +20,7 @@ public class CatalogEntry {
*/
private @NonNull Material icon;
private @NonNull String name;
private @NonNull String description;
private @Nullable String topic;
private @NonNull List<String> tags = new ArrayList<>();
private @NonNull String repository;
@ -29,6 +30,7 @@ public class CatalogEntry {
Material material = Material.getMaterial(object.get("icon").getAsString());
this.icon = (material != null) ? material : Material.PAPER;
this.name = object.get("name").getAsString();
this.description = object.get("description").getAsString();
this.repository = object.get("repository").getAsString();
this.topic = object.get("topic").getAsString();
}
@ -47,6 +49,11 @@ public class CatalogEntry {
return name;
}
@NonNull
public String getDescription() {
return description;
}
@Nullable
public String getTopic() {
return topic;