java.lang.Object
org.mvplugins.multiverse.netherportals.links.WorldLink

@AvailableSince("5.1") public final class WorldLink extends Object
Stores the Nether and End portal destinations configured for a world.
Since:
5.1
  • Constructor Details

    • WorldLink

      @AvailableSince("5.1") public WorldLink(@NotNull @NotNull String from)
      Creates an empty set of portal links for a world.
      Parameters:
      from - The source world name.
      Since:
      5.1
  • Method Details

    • getFrom

      @AvailableSince("5.1") @NotNull public @NotNull String 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

      @AvailableSince("5.1") public void removeLinkTo(@NotNull @NotNull WorldLinkType worldLinkType)
      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