Package cn.lunadeer.dominion.providers
Class CopyProvider
java.lang.Object
cn.lunadeer.dominion.providers.CopyProvider
API operations for copying selected management data between dominions.
Copy operations run asynchronously and return the target dominion when the
copy succeeds. A null result indicates cancellation or failure.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static CopyProviderThe provider instance initialized by Dominion. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract CompletableFuture<DominionDTO>copy(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO source, @NotNull DominionDTO target, @NotNull CopyType type) Copies one category of settings or membership data from one dominion to another.static CopyProviderGets the initialized provider instance.
-
Field Details
-
instance
The provider instance initialized by Dominion.
-
-
Constructor Details
-
CopyProvider
public CopyProvider()
-
-
Method Details
-
getInstance
Gets the initialized provider instance.- Returns:
- the provider, or
nullbefore Dominion initialization
-
copy
public abstract CompletableFuture<DominionDTO> copy(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO source, @NotNull @NotNull DominionDTO target, @NotNull @NotNull CopyType type) Copies one category of settings or membership data from one dominion to another.- Parameters:
operator- the command sender performing the operationsource- the dominion to copy fromtarget- the dominion to copy totype- the category of data to copy- Returns:
- a future that completes with the target dominion, or
nullwhen authorization, validation, or copying fails
-