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.
    • 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)