Klasse SellbackService
java.lang.Object
de.delinkedde.areashopreborn.application.SellbackService
Returns player-owned parcels to their city landlord or the virtual server owner.
Vault cannot participate in the SQLite transaction, so the workflow records progress before touching money and compensates the payment when the database transition fails. Failures after ownership was committed are retained for administrator review.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent) Creates the sellback workflow.SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent, EventPublisher events) Creates a sellback service with an explicit event publisher.SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent, EventPublisher events, OfflinePlayerResolver players) Creates a sellback service with fully replaceable platform boundaries.SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent, CompletableFuture<?> startupRecovery) Creates a sellback workflow gated by the startup recovery scan.SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent, CompletableFuture<?> startupRecovery, EventPublisher events, OfflinePlayerResolver players) Creates a sellback service with recovery and all platform boundaries replaceable. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungSells a parcel back using its latest completed purchase price as the reference amount.sellBack(UUID sellerId, String regionName, OperationCause cause) Sells a parcel back while exposing the initiating subsystem to Bukkit event listeners.
-
Konstruktordetails
-
SellbackService
public SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent) Creates the sellback workflow.- Parameter:
database- asynchronous database executorestates- estate repositorysellbacks- sellback journal repositoryeconomy- Vault economy adapterworldGuard- WorldGuard adapterthreads- server-thread bridgepayoutPercent- percentage of the last completed purchase price paid to the owner
-
SellbackService
public SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent, CompletableFuture<?> startupRecovery) Creates a sellback workflow gated by the startup recovery scan.- Parameter:
database- asynchronous database executorestates- estate repositorysellbacks- sellback journal repositoryeconomy- Vault economy adapterworldGuard- WorldGuard adapterthreads- server-thread bridgepayoutPercent- percentage of the latest purchase price paid backstartupRecovery- recovery gate completed before any new payment starts
-
SellbackService
public SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent, EventPublisher events) Creates a sellback service with an explicit event publisher.- Parameter:
database- database executorestates- estate repositorysellbacks- sellback journal repositoryeconomy- Vault economy adapterworldGuard- WorldGuard adapterthreads- Paper thread bridgepayoutPercent- percentage of the latest purchase price paid backevents- synchronous platform event publisher
-
SellbackService
public SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent, EventPublisher events, OfflinePlayerResolver players) Creates a sellback service with fully replaceable platform boundaries.- Parameter:
database- database executorestates- estate repositorysellbacks- sellback journal repositoryeconomy- Vault economy adapterworldGuard- WorldGuard adapterthreads- Paper thread bridgepayoutPercent- percentage of the latest purchase price paid backevents- synchronous platform event publisherplayers- Bukkit offline-player account resolver
-
SellbackService
public SellbackService(Database database, EstateRepository estates, SellbackRepository sellbacks, EconomyGateway economy, WorldGuardGateway worldGuard, ThreadBridge threads, BigDecimal payoutPercent, CompletableFuture<?> startupRecovery, EventPublisher events, OfflinePlayerResolver players) Creates a sellback service with recovery and all platform boundaries replaceable.- Parameter:
database- database executorestates- estate repositorysellbacks- sellback journal repositoryeconomy- Vault economy adapterworldGuard- WorldGuard adapterthreads- Paper thread bridgepayoutPercent- percentage of the latest purchase price paid backstartupRecovery- recovery gate completed before new paymentsevents- synchronous platform event publisherplayers- Bukkit offline-player account resolver
-
-
Methodendetails
-
sellBack
Sells a parcel back using its latest completed purchase price as the reference amount.- Parameter:
sellerId- current parcel ownerregionName- parcel display name or WorldGuard identifier- Gibt zurück:
- future containing the completed journal snapshot
-
sellBack
public CompletableFuture<SellbackTransaction> sellBack(UUID sellerId, String regionName, OperationCause cause) Sells a parcel back while exposing the initiating subsystem to Bukkit event listeners.- Parameter:
sellerId- current parcel ownerregionName- parcel display name or WorldGuard identifiercause- initiating subsystem- Gibt zurück:
- future containing the completed durable journal snapshot
-