Class WorldLink
java.lang.Object
org.mvplugins.multiverse.netherportals.links.WorldLink
Stores the Nether and End portal destinations configured for a world.
- Since:
- 5.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetFrom()Gets the source world name.@NotNull org.mvplugins.multiverse.external.vavr.control.Option<String> getLinkTo(@NotNull WorldLinkType worldLinkType) Gets the destination for a link type.booleanhasLinks()Checks whether this world has any configured destinations.voidremoveLinkTo(@NotNull WorldLinkType worldLinkType) Removes the destination for a link type.voidsetLinkTo(@NotNull WorldLinkType worldLinkType, @NotNull String link) Sets the destination for a link type.
-
Constructor Details
-
WorldLink
Creates an empty set of portal links for a world.- Parameters:
from- The source world name.- Since:
- 5.1
-
-
Method Details
-
getFrom
Gets the source world name.- Returns:
- The source world name.
- Since:
- 5.1
-
getLinkTo
@AvailableSince("5.1") @NotNull public @NotNull org.mvplugins.multiverse.external.vavr.control.Option<String> getLinkTo(@NotNull @NotNull WorldLinkType worldLinkType) Gets the destination for a link type.- Parameters:
worldLinkType- The link type.- Returns:
- The configured destination, or an empty option when unset.
- Since:
- 5.1
-
setLinkTo
@AvailableSince("5.1") public void setLinkTo(@NotNull @NotNull WorldLinkType worldLinkType, @NotNull @NotNull String link) Sets the destination for a link type.- Parameters:
worldLinkType- The link type.link- The destination world name.- Since:
- 5.1
-
removeLinkTo
Removes the destination for a link type.- Parameters:
worldLinkType- The link type.- Since:
- 5.1
-
hasLinks
@AvailableSince("5.1") public boolean hasLinks()Checks whether this world has any configured destinations.- Returns:
- Whether at least one link is configured.
- Since:
- 5.1
-