Class DestinationsProvider
java.lang.Object
org.mvplugins.multiverse.core.destination.DestinationsProvider
Provides destinations for teleportation.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable Destination
<?, ?, ?> getDestinationById
(@Nullable String identifier) Gets a destination by its identifier.@NotNull Collection
<Destination<?, ?, ?>> Gets all registered destinations.@NotNull Attempt
<DestinationInstance<?, ?>, FailureReason> parseDestination
(@NotNull String destinationString) Converts a destination string to a destination object.void
registerDestination
(@NotNull Destination<?, ?, ?> destination) Adds a destination to the provider.@NotNull Collection
<DestinationSuggestionPacket> suggestDestinations
(@NotNull org.bukkit.command.CommandSender sender, @Nullable String destinationParams)
-
Method Details
-
registerDestination
Adds a destination to the provider.- Parameters:
destination
- The destination.
-
parseDestination
@NotNull public @NotNull Attempt<DestinationInstance<?,?>, parseDestinationFailureReason> (@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
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)
-