Class DestinationsProvider

java.lang.Object
org.mvplugins.multiverse.core.destination.DestinationsProvider

@Service public final class DestinationsProvider extends Object
Provides destinations for teleportation.
  • Method Details

    • registerDestination

      public void registerDestination(@NotNull @NotNull Destination<?,?,?> destination)
      Adds a destination to the provider.
      Parameters:
      destination - The destination.
    • parseDestination

      @NotNull public @NotNull Attempt<DestinationInstance<?,?>,FailureReason> parseDestination(@NotNull @NotNull String destinationString)
      Converts a destination string to a destination object.
      Parameters:
      destinationString - The destination string.
      Returns:
      The destination object, or null if invalid format.
    • parseDestination

      @AvailableSince("5.1") @NotNull public @NotNull Attempt<DestinationInstance<?,?>,FailureReason> parseDestination(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String destinationString)
      Converts a destination string to a destination object with sender context.
      Parameters:
      sender - The target sender context.
      destinationString - The destination string.
      Returns:
      The destination object, or null if invalid format.
      Since:
      5.1
    • getDestinationById

      @Nullable public @Nullable Destination<?,?,?> getDestinationById(@Nullable @Nullable String identifier)
      Gets a destination by its identifier.
      Parameters:
      identifier - The identifier.
      Returns:
      The destination, or null if not found.
    • getDestinations

      @NotNull public @NotNull Collection<Destination<?,?,?>> getDestinations()
      Gets all registered destinations.
      Returns:
      A collection of destinations.
    • suggestDestinations

      @NotNull public @NotNull Collection<DestinationSuggestionPacket> suggestDestinations(@NotNull @NotNull org.bukkit.command.CommandSender sender, @Nullable @Nullable String destinationParams)
      Gets suggestions for possible parsable destinations.
      Parameters:
      sender - The target sender context.
      destinationParams - The current user input.
      Returns:
      A collection of destination suggestions.
    • suggestDestinationStrings

      @AvailableSince("5.1") @NotNull public @NotNull Collection<String> suggestDestinationStrings(@NotNull @NotNull org.bukkit.command.CommandSender sender, @Nullable @Nullable String destinationParams)
      Gets suggestions for possible parsable destinations.
      Parameters:
      sender - The target sender context.
      destinationParams - The current user input.
      Returns:
      A collection of destination suggestions in parsable string format.
      Since:
      5.1