Class CopyProvider

java.lang.Object
cn.lunadeer.dominion.providers.CopyProvider

public abstract class CopyProvider extends Object
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 Details

    • instance

      protected static CopyProvider instance
      The provider instance initialized by Dominion.
  • Constructor Details

    • CopyProvider

      public CopyProvider()
  • Method Details

    • getInstance

      public static CopyProvider getInstance()
      Gets the initialized provider instance.
      Returns:
      the provider, or null before 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 operation
      source - the dominion to copy from
      target - the dominion to copy to
      type - the category of data to copy
      Returns:
      a future that completes with the target dominion, or null when authorization, validation, or copying fails