Skip to content

Commit

Permalink
Readded the description in CatalogEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
Poslovitch committed Jun 9, 2019
1 parent 870bdcb commit 2340b19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static void openPanel(@NonNull User user, @NonNull View view) {
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) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,6 +30,7 @@ public CatalogEntry(@NonNull JsonObject object) {
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();
}
Expand All @@ -47,6 +49,11 @@ public String getName() {
return name;
}

@NonNull
public String getDescription() {
return description;
}

@Nullable
public String getTopic() {
return topic;
Expand Down

0 comments on commit 2340b19

Please sign in to comment.