Skip to content

Commit

Permalink
feat(api): add custom wiki page
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Aug 6, 2023
1 parent f86d54f commit 881ea3f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,18 @@ public final void addWikiPage(@Nonnull String page) {
wikiURL = Optional.of(getAddon().getWikiURL().replace("%item%", page));
}

/**
* This method assign the given wiki URL to this Item.
*
* @param url
* The associated wiki page URL.
*/
public final void addCustomWikiPage(@Nonnull String url) {
Validate.notNull(url, "Wiki URL cannot be null.");
Validate.isTrue(getState() != ItemState.UNREGISTERED, "Wiki page can only be added after item has been registered.");
wikiURL = Optional.of(url);
}

/**
* This method returns the wiki page that has been assigned to this item.
* It will return null, if no wiki page was found.
Expand Down

0 comments on commit 881ea3f

Please sign in to comment.