Klasse LimitService

java.lang.Object
de.delinkedde.areashopreborn.application.LimitService

public final class LimitService extends Object
Resolves permission-selected limit profiles without blocking Paper's server thread.
  • Konstruktordetails

    • LimitService

      public LimitService(LimitProfileRegistry profiles, PermissionGateway permissions, ThreadBridge threads, Database database, RegionGroupRepository groups)
      Creates the limit resolver.
      Parameter:
      profiles - validated profile registry
      permissions - Vault permission adapter
      threads - Paper main-thread bridge
      database - asynchronous SQLite executor
      groups - persistent region-group repository
    • LimitService

      public LimitService(LimitProfileRegistry profiles, PermissionGateway permissions, ThreadBridge threads, Database database, RegionGroupRepository groups, int maximumAssignmentsPerRegion)
      Creates a resolver with a hard ceiling for direct and inherited group rules.
      Parameter:
      profiles - validated profile registry
      permissions - Vault permission adapter
      threads - Paper main-thread bridge
      database - asynchronous SQLite executor
      groups - persistent region-group repository
      maximumAssignmentsPerRegion - maximum direct assignments on one region
  • Methodendetails

    • resolve

      public CompletableFuture<LimitProfile> resolve(UUID playerId)
      Resolves the effective profile for a player UUID. The virtual server identity always receives an unlimited synthetic profile.
      Parameter:
      playerId - player or system identity
      Gibt zurück:
      future containing the effective immutable profile
    • resolve

      public CompletableFuture<LimitProfile> resolve(UUID playerId, UUID regionId)
      Resolves the effective profile including deterministic rules assigned to one region. Explicit player permission profiles take precedence over group overrides.
      Parameter:
      playerId - player whose permission profile is selected
      regionId - city or parcel providing group context
      Gibt zurück:
      future containing the effective immutable profile
    • reload

      public CompletableFuture<Void> reload()
      Reloads the limits file after validation.
      Gibt zurück:
      completion future
    • profiles

      public List<LimitProfile> profiles()
      Lists configured profiles in selection order.
      Gibt zurück:
      immutable configured profiles