Class LinkManager
java.lang.Object
com.zetaplugins.serverlinksz.util.LinkManager
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a link to the config and updates the linksvoidClears all links from the server@Nullable LinkManager.LinkGets a link by keyGets all link keys from the configgetLinkKeys(Predicate<LinkManager.Link> predicate) Gets all link keys from the config that match the predicatevoidremoveLink(String key) Removes a link from the config and updates the linksvoidUpdates the links
-
Constructor Details
-
LinkManager
-
-
Method Details
-
updateLinks
public void updateLinks()Updates the links -
addLink
Adds a link to the config and updates the links- Parameters:
key- The key of the linkname- The name of the linkurl- The URL of the linkcommand- Whether the link should allow commandsstringType- The type of the link as a string
-
removeLink
Removes a link from the config and updates the links- Parameters:
key- The key of the link
-
clearLinks
public void clearLinks()Clears all links from the server -
getLink
Gets a link by key- Parameters:
key- The key of the link- Returns:
- The link
-
getLinkKeys
Gets all link keys from the config- Returns:
- All link keys
-
getLinkKeys
Gets all link keys from the config that match the predicate- Parameters:
predicate- The predicate to match- Returns:
- All link keys that match the predicate
-