Klasse EstateApplicationService
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic final recordImmutable bounded market page used by the inventory browser. -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungEstateApplicationService(Database database, EstateRepository repository, WorldGuardGateway worldGuard, ThreadBridge threads, RegionPolicy policy, BigDecimal minimumPrice, BigDecimal maximumPrice, String currency, LimitService limits) Creates the central estate application service.EstateApplicationService(Database database, EstateRepository repository, WorldGuardGateway worldGuard, ThreadBridge threads, RegionPolicy policy, BigDecimal minimumPrice, BigDecimal maximumPrice, String currency, LimitService limits, EventPublisher events) Creates the central estate application service with an explicit event publisher.EstateApplicationService(Database database, EstateRepository repository, WorldGuardGateway worldGuard, ThreadBridge threads, RegionPolicy policy, BigDecimal minimumPrice, BigDecimal maximumPrice, String currency, LimitService limits, EventPublisher events, int maximumGeometryCandidates) Creates the service with an absolute city geometry safety ceiling.EstateApplicationService(Database database, EstateRepository repository, WorldGuardGateway worldGuard, ThreadBridge threads, RegionPolicy policy, BigDecimal minimumPrice, BigDecimal maximumPrice, String currency, LimitService limits, EventPublisher events, int maximumGeometryCandidates, GeometryJournalRepository journal) Creates the service with an explicit geometry journal for isolated tests. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcancelListing(UUID actorId, String regionName, boolean administrative) Cancels an active listing and restores the appropriate region state.cancelListing(UUID actorId, String regionName, boolean administrative, OperationCause cause) Cancels an active listing with an explicit event origin.changeCityBuilder(UUID actorId, String cityName, UUID builderId, boolean adding, boolean administrative) Adds or removes a build-only city role and synchronizes all landlord-controlled protection.changeCityManager(UUID landlordId, String cityName, UUID managerId, boolean adding) Adds or removes a delegated city manager without granting WorldGuard build membership.changeCityManager(UUID actorId, String cityName, UUID managerId, boolean adding, boolean administrative) Adds or removes a city manager with an optional administrative authority bypass.createCity(UUID actorId, UUID landlordId, String protectionId, String displayName, Selection selection) Creates a new city in both WorldGuard and the estate database from an administrator's selection.createCity(UUID actorId, UUID landlordId, String protectionId, String displayName, Selection selection, int minY, int maxY) Creates a new city with an explicit inclusive height range.createParcel(UUID actorId, String cityName, String displayName, Selection selection, boolean bypassLimits) Creates a draft parcel inside a city and mirrors it to WorldGuard.createParcel(UUID actorId, String cityName, String parcelKey, String displayName, Selection selection, boolean bypassLimits) Creates a draft parcel with an explicit city-local technical key.createParcel(UUID actorId, String cityName, String parcelKey, String displayName, Selection selection, int minY, int maxY, boolean bypassLimits) Creates a draft parcel with an explicit key and height range.deleteDraftParcel(UUID actorId, String regionName) Permanently deletes an unlisted draft parcel from WorldGuard and SQLite.deleteEmptyCity(UUID actorId, String cityName) Permanently deletes an empty managed city from WorldGuard and SQLite.expandCity(UUID actorId, String cityName, Selection selection) Expands an existing city by unioning its polygon with an administrator selection.Resolves the most specific managed region at a block position without blocking Paper.findAvailable(String cityName) Lists parcels currently offered for initial sale or resale.findAvailable(String cityName, int limit) Returns a bounded player-facing market list.findAvailablePage(String cityName, int requestedPage, int pageSize) Loads one exact GUI market page and its total count without loading the whole market.findCityAt(String worldKey, int x, int y, int z) Resolves the containing city when the position lies in either a city or one of its parcels.findCityBuilders(UUID actorId, String cityName, boolean administrative, int limit) Lists build-only players of a city.findCityManagers(UUID actorId, String cityName) Lists delegated managers of a city.findCityManagers(UUID actorId, String cityName, boolean administrative, int limit) Lists a bounded manager prefix with an optional administrative authority bypass.findCityManagers(UUID actorId, String cityName, int limit) Lists a bounded manager prefix after checking city management authority.findManagedParcels(UUID actorId, String cityName) Lists direct parcels of a city after verifying management authority.findManagedParcels(UUID actorId, String cityName, int limit) Returns a bounded direct-parcel list after verifying management authority.findMarketListings(String cityName, int limit) Loads bounded player-facing sale cards including city names and prices.Lists regions owned or managed by a player.Returns a bounded player-facing ownership list.findRegion(String name) Finds a region globally by display name or WorldGuard identifier.findUnfinishedGeometryOperations(int limit) Lists geometry operations that never reached a terminal journal state.importCity(UUID actorId, UUID landlordId, String displayName, WorldGuardGateway.ProtectionRegion protection) Imports an existing WorldGuard region as a managed city.mergeParcels(UUID actorId, String targetName, String sourceName, boolean administrative) Merges two adjacent parcels while retaining the target parcel identity.Migrates existing managed WorldGuard regions to the priority-only hierarchy.previewCityExpansion(String cityName, Selection selection) Validates and returns the exact city geometry that a selection would produce.publishInitialSale(UUID actorId, String regionName, BigDecimal price) Publishes a draft parcel for initial sale.publishInitialSaleAdministrative(UUID actorId, String regionName, BigDecimal price) Publishes a draft parcel for initial sale while bypassing landlord management checks.publishResale(UUID ownerId, String regionName, BigDecimal price) Publishes an owned parcel for resale.publishResale(UUID ownerId, String regionName, BigDecimal price, OperationCause cause) Publishes an owned parcel for resale with an explicit event origin.renameParcel(UUID actorId, String regionName, String displayName) Renames a parcel without changing its stable UUID or WorldGuard identifier.setCityHeight(UUID actorId, String cityName, int minY, int maxY) Changes a city's inclusive build-height range.setParcelHeight(UUID actorId, String parcelName, int minY, int maxY, boolean administrative) Changes the height of a free draft parcel.unpublishManagedListing(UUID actorId, String regionName) Unpublishes a free landlord-controlled initial-sale or rental listing.
-
Konstruktordetails
-
EstateApplicationService
public EstateApplicationService(Database database, EstateRepository repository, WorldGuardGateway worldGuard, ThreadBridge threads, RegionPolicy policy, BigDecimal minimumPrice, BigDecimal maximumPrice, String currency, LimitService limits) Creates the central estate application service.- Parameter:
database- database executorrepository- estate repositoryworldGuard- WorldGuard adapterthreads- Paper thread bridgepolicy- parcel validation policyminimumPrice- minimum allowed listing pricemaximumPrice- maximum allowed listing pricecurrency- logical currency namelimits- permission-selected creation limits
-
EstateApplicationService
public EstateApplicationService(Database database, EstateRepository repository, WorldGuardGateway worldGuard, ThreadBridge threads, RegionPolicy policy, BigDecimal minimumPrice, BigDecimal maximumPrice, String currency, LimitService limits, EventPublisher events) Creates the central estate application service with an explicit event publisher.- Parameter:
database- database executorrepository- estate repositoryworldGuard- WorldGuard adapterthreads- Paper thread bridgepolicy- parcel validation policyminimumPrice- minimum allowed listing pricemaximumPrice- maximum allowed listing pricecurrency- logical currency namelimits- permission-selected creation limitsevents- synchronous platform event publisher
-
EstateApplicationService
public EstateApplicationService(Database database, EstateRepository repository, WorldGuardGateway worldGuard, ThreadBridge threads, RegionPolicy policy, BigDecimal minimumPrice, BigDecimal maximumPrice, String currency, LimitService limits, EventPublisher events, int maximumGeometryCandidates) Creates the service with an absolute city geometry safety ceiling.- Parameter:
database- database executorrepository- estate repositoryworldGuard- WorldGuard adapterthreads- Paper thread bridgepolicy- parcel validation policyminimumPrice- minimum allowed listing pricemaximumPrice- maximum allowed listing pricecurrency- logical currency namelimits- permission-selected creation limitsevents- synchronous platform event publishermaximumGeometryCandidates- absolute maximum children accepted in one city
-
EstateApplicationService
public EstateApplicationService(Database database, EstateRepository repository, WorldGuardGateway worldGuard, ThreadBridge threads, RegionPolicy policy, BigDecimal minimumPrice, BigDecimal maximumPrice, String currency, LimitService limits, EventPublisher events, int maximumGeometryCandidates, GeometryJournalRepository journal) Creates the service with an explicit geometry journal for isolated tests.- Parameter:
database- database executorrepository- estate repositoryworldGuard- WorldGuard adapterthreads- Paper thread bridgepolicy- parcel validation policyminimumPrice- minimum allowed listing pricemaximumPrice- maximum allowed listing pricecurrency- logical currency namelimits- permission-selected creation limitsevents- synchronous platform event publishermaximumGeometryCandidates- absolute maximum children accepted in one cityjournal- restartable geometry operation journal
-
-
Methodendetails
-
findUnfinishedGeometryOperations
Lists geometry operations that never reached a terminal journal state.An unfinished entry means WorldGuard and SQLite may describe different shapes. The startup scan uses this to block mutations instead of silently continuing.
- Parameter:
limit- maximum entries returned- Gibt zurück:
- future containing unfinished geometry operations
-
importCity
public CompletableFuture<EstateRegion> importCity(UUID actorId, UUID landlordId, String displayName, WorldGuardGateway.ProtectionRegion protection) Imports an existing WorldGuard region as a managed city.- Parameter:
actorId- administrator performing the importlandlordId- initial city landlorddisplayName- city display nameprotection- existing WorldGuard region snapshot- Gibt zurück:
- future containing the created city
-
createCity
public CompletableFuture<EstateRegion> createCity(UUID actorId, UUID landlordId, String protectionId, String displayName, Selection selection) Creates a new city in both WorldGuard and the estate database from an administrator's selection. This use case deliberately uses the WorldGuard API so administrators do not need to issue a separate/rg definecommand.- Parameter:
actorId- administrator creating the citylandlordId- initial city landlord and WorldGuard ownerprotectionId- unique WorldGuard identifier chosen for the citydisplayName- human-readable city nameselection- selected city cuboid- Gibt zurück:
- future containing the newly created city
-
createCity
public CompletableFuture<EstateRegion> createCity(UUID actorId, UUID landlordId, String protectionId, String displayName, Selection selection, int minY, int maxY) Creates a new city with an explicit inclusive height range.- Parameter:
actorId- administrator creating the citylandlordId- initial city landlordprotectionId- stable city and WorldGuard identifierdisplayName- human-readable city nameselection- selected horizontal footprintminY- inclusive minimum build heightmaxY- inclusive maximum build height- Gibt zurück:
- future containing the created city
-
createParcel
public CompletableFuture<EstateRegion> createParcel(UUID actorId, String cityName, String displayName, Selection selection, boolean bypassLimits) Creates a draft parcel inside a city and mirrors it to WorldGuard.- Parameter:
actorId- landlord or delegated managercityName- city display name or protection identifierdisplayName- new parcel display nameselection- selected cuboidbypassLimits- whether administrative size/count limits may be bypassed- Gibt zurück:
- future containing the created parcel
-
createParcel
public CompletableFuture<EstateRegion> createParcel(UUID actorId, String cityName, String parcelKey, String displayName, Selection selection, boolean bypassLimits) Creates a draft parcel with an explicit city-local technical key.- Parameter:
actorId- landlord or delegated managercityName- city display name or protection identifierparcelKey- city-local stable key used incity_parcelWorldGuard namesdisplayName- human-readable parcel nameselection- selected horizontal footprintbypassLimits- whether administrative size/count limits may be bypassed- Gibt zurück:
- future containing the created parcel
-
createParcel
public CompletableFuture<EstateRegion> createParcel(UUID actorId, String cityName, String parcelKey, String displayName, Selection selection, int minY, int maxY, boolean bypassLimits) Creates a draft parcel with an explicit key and height range.- Parameter:
actorId- landlord or delegated managercityName- city display name or protection identifierparcelKey- city-local technical keydisplayName- human-readable parcel nameselection- selected horizontal footprintminY- inclusive minimum heightmaxY- inclusive maximum heightbypassLimits- whether administrative limits may be bypassed- Gibt zurück:
- future containing the created parcel
-
expandCity
public CompletableFuture<EstateRegion> expandCity(UUID actorId, String cityName, Selection selection) Expands an existing city by unioning its polygon with an administrator selection.The selection contributes only X/Z coordinates. The city's configured height range is retained. Disconnected islands, holes, and overlaps with another managed city are rejected.
- Parameter:
actorId- administrator performing the expansioncityName- city display name or protection identifierselection- selected horizontal extension- Gibt zurück:
- future containing the updated city snapshot
-
previewCityExpansion
Validates and returns the exact city geometry that a selection would produce.- Parameter:
cityName- city display name or protection identifierselection- proposed horizontal extension- Gibt zurück:
- future containing the non-mutating expansion preview geometry
-
setCityHeight
public CompletableFuture<EstateRegion> setCityHeight(UUID actorId, String cityName, int minY, int maxY) Changes a city's inclusive build-height range.- Parameter:
actorId- administrator performing the changecityName- city display name or protection identifierminY- new inclusive minimum heightmaxY- new inclusive maximum height- Gibt zurück:
- future containing the updated city
-
setParcelHeight
public CompletableFuture<EstateRegion> setParcelHeight(UUID actorId, String parcelName, int minY, int maxY, boolean administrative) Changes the height of a free draft parcel.- Parameter:
actorId- landlord or manager performing the changeparcelName- parcel display name or protection identifierminY- new inclusive minimum heightmaxY- new inclusive maximum heightadministrative- whether the caller uses the dedicated administrative permission- Gibt zurück:
- future containing the updated parcel
-
mergeParcels
public CompletableFuture<EstateRegion> mergeParcels(UUID actorId, String targetName, String sourceName, boolean administrative) Merges two adjacent parcels while retaining the target parcel identity.- Parameter:
actorId- city landlord or administratortargetName- retained parcel display name or protection identifiersourceName- source parcel that becomes archivedadministrative- whether the dedicated administrative merge permission is used- Gibt zurück:
- future containing the expanded target parcel
-
publishInitialSale
public CompletableFuture<Listing> publishInitialSale(UUID actorId, String regionName, BigDecimal price) Publishes a draft parcel for initial sale.- Parameter:
actorId- landlord or delegated managerregionName- parcel display name or protection identifierprice- gross listing price- Gibt zurück:
- future containing the active listing
-
publishInitialSaleAdministrative
public CompletableFuture<Listing> publishInitialSaleAdministrative(UUID actorId, String regionName, BigDecimal price) Publishes a draft parcel for initial sale while bypassing landlord management checks.The listing recipient remains the configured city landlord, including the virtual
Serverlandlord. Administrative execution changes authorization only; it never redirects the money recipient to the administrator.- Parameter:
actorId- administrator creating the listingregionName- parcel display name or protection identifierprice- gross listing price- Gibt zurück:
- future containing the active listing
-
publishResale
Publishes an owned parcel for resale.- Parameter:
ownerId- current parcel ownerregionName- parcel display name or protection identifierprice- gross resale price- Gibt zurück:
- future containing the active resale listing
-
publishResale
public CompletableFuture<Listing> publishResale(UUID ownerId, String regionName, BigDecimal price, OperationCause cause) Publishes an owned parcel for resale with an explicit event origin.- Parameter:
ownerId- current parcel ownerregionName- parcel display name or protection identifierprice- gross resale pricecause- initiating subsystem- Gibt zurück:
- future containing the active resale listing
-
cancelListing
public CompletableFuture<Void> cancelListing(UUID actorId, String regionName, boolean administrative) Cancels an active listing and restores the appropriate region state.- Parameter:
actorId- listing owner or administratorregionName- region display name or protection identifieradministrative- whether ownership checks may be bypassed- Gibt zurück:
- completion future
-
cancelListing
public CompletableFuture<Void> cancelListing(UUID actorId, String regionName, boolean administrative, OperationCause cause) Cancels an active listing with an explicit event origin.- Parameter:
actorId- listing owner or administratorregionName- region display name or protection identifieradministrative- whether ownership checks may be bypassedcause- initiating subsystem- Gibt zurück:
- completion future
-
unpublishManagedListing
Unpublishes a free landlord-controlled initial-sale or rental listing.- Parameter:
actorId- landlord or delegated city managerregionName- parcel display name or protection identifier- Gibt zurück:
- completion future
-
findOwned
Lists regions owned or managed by a player.- Parameter:
playerId- player identifier- Gibt zurück:
- future containing matching regions
-
findOwned
Returns a bounded player-facing ownership list.- Parameter:
playerId- player identifierlimit- maximum number of regions to return- Gibt zurück:
- future containing the bounded matching regions
-
findAvailable
Lists parcels currently offered for initial sale or resale.- Parameter:
cityName- optional city display name or WorldGuard identifier- Gibt zurück:
- future containing matching saleable parcels
-
findAvailable
Returns a bounded player-facing market list.- Parameter:
cityName- optional city display name or WorldGuard identifierlimit- maximum number of regions to return- Gibt zurück:
- future containing the bounded saleable regions
-
findMarketListings
public CompletableFuture<List<EstateRepository.MarketListing>> findMarketListings(String cityName, int limit) Loads bounded player-facing sale cards including city names and prices.- Parameter:
cityName- optional city display name or WorldGuard identifierlimit- maximum cards to return- Gibt zurück:
- future containing sale cards without internal parent identifiers
-
findAvailablePage
public CompletableFuture<EstateApplicationService.MarketPage> findAvailablePage(String cityName, int requestedPage, int pageSize) Loads one exact GUI market page and its total count without loading the whole market.- Parameter:
cityName- optional city filterrequestedPage- zero-based requested pagepageSize- rows per page- Gibt zurück:
- normalized page snapshot
-
findAt
Resolves the most specific managed region at a block position without blocking Paper.- Parameter:
worldKey- Bukkit world keyx- block X coordinatey- block Y coordinatez- block Z coordinate- Gibt zurück:
- future containing the region or failing when the position is unmanaged
-
findCityAt
Resolves the containing city when the position lies in either a city or one of its parcels.- Parameter:
worldKey- Bukkit world keyx- block X coordinatey- block Y coordinatez- block Z coordinate- Gibt zurück:
- future containing the enclosing city
-
findManagedParcels
Lists direct parcels of a city after verifying management authority.- Parameter:
actorId- landlord or delegated managercityName- city display name or protection identifier- Gibt zurück:
- future containing direct city parcels
-
findManagedParcels
public CompletableFuture<List<EstateRegion>> findManagedParcels(UUID actorId, String cityName, int limit) Returns a bounded direct-parcel list after verifying management authority.- Parameter:
actorId- landlord or delegated managercityName- city display name or protection identifierlimit- maximum number of parcels to return- Gibt zurück:
- future containing the bounded direct city parcels
-
renameParcel
public CompletableFuture<EstateRegion> renameParcel(UUID actorId, String regionName, String displayName) Renames a parcel without changing its stable UUID or WorldGuard identifier.- Parameter:
actorId- landlord, delegated manager, or parcel ownerregionName- parcel display name or protection identifierdisplayName- replacement display name- Gibt zurück:
- future containing the previous region snapshot
-
deleteDraftParcel
Permanently deletes an unlisted draft parcel from WorldGuard and SQLite.- Parameter:
actorId- landlord or delegated managerregionName- parcel display name or protection identifier- Gibt zurück:
- completion future
-
deleteEmptyCity
Permanently deletes an empty managed city from WorldGuard and SQLite.A city with any managed child parcel is rejected regardless of the child state. This deliberately prevents cascading destruction of ownership, listings, contracts, displays, or financial history through a deceptively small command.
- Parameter:
actorId- administrator performing the deletioncityName- city display name or protection identifier- Gibt zurück:
- completion future
-
changeCityManager
public CompletableFuture<Void> changeCityManager(UUID landlordId, String cityName, UUID managerId, boolean adding) Adds or removes a delegated city manager without granting WorldGuard build membership.- Parameter:
landlordId- current city landlordcityName- city display name or protection identifiermanagerId- delegated manageradding- whether the manager should be added- Gibt zurück:
- completion future
-
changeCityManager
public CompletableFuture<Void> changeCityManager(UUID actorId, String cityName, UUID managerId, boolean adding, boolean administrative) Adds or removes a city manager with an optional administrative authority bypass.- Parameter:
actorId- city landlord or administrator performing the changecityName- city display name or protection identifiermanagerId- delegated manageradding- whether the manager should be addedadministrative- whether the dedicated administrative permission is used- Gibt zurück:
- completion future
-
findCityManagers
Lists delegated managers of a city.- Parameter:
actorId- city landlord or delegated managercityName- city display name or protection identifier- Gibt zurück:
- future containing manager UUIDs
-
findCityManagers
Lists a bounded manager prefix after checking city management authority.- Parameter:
actorId- city landlord or delegated managercityName- city display name or protection identifierlimit- maximum identities returned- Gibt zurück:
- future containing manager UUIDs
-
findCityManagers
public CompletableFuture<List<UUID>> findCityManagers(UUID actorId, String cityName, boolean administrative, int limit) Lists a bounded manager prefix with an optional administrative authority bypass.- Parameter:
actorId- city manager, landlord, or administratorcityName- city display name or protection identifieradministrative- whether the dedicated administrative permission is usedlimit- maximum identities returned- Gibt zurück:
- future containing manager UUIDs
-
changeCityBuilder
public CompletableFuture<Void> changeCityBuilder(UUID actorId, String cityName, UUID builderId, boolean adding, boolean administrative) Adds or removes a build-only city role and synchronizes all landlord-controlled protection.- Parameter:
actorId- city landlord or administratorcityName- city display name or protection identifierbuilderId- affected playeradding- whether the role is addedadministrative- whether the dedicated administrative permission is used- Gibt zurück:
- completion future
-
findCityBuilders
public CompletableFuture<List<UUID>> findCityBuilders(UUID actorId, String cityName, boolean administrative, int limit) Lists build-only players of a city.- Parameter:
actorId- city landlord, manager, or administratorcityName- city display name or protection identifieradministrative- whether management authority may be bypassedlimit- maximum identities returned- Gibt zurück:
- future containing builder UUIDs
-
findRegion
Finds a region globally by display name or WorldGuard identifier.- Parameter:
name- region name- Gibt zurück:
- future containing the region
-
migratePriorityModel
Migrates existing managed WorldGuard regions to the priority-only hierarchy.Cities become priority 1, parcels become priority 2, and every legacy parent is removed. Free landlord-controlled parcels receive explicit owner/member domains so removing inherited access never creates a protection lockout.
- Gibt zurück:
- future containing the migrated region count
-