Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow addons to add wiki pages to items #3937

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.");
ybw0014 marked this conversation as resolved.
Show resolved Hide resolved
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