Klasse HomeAccessRepository

java.lang.Object
de.delinkedde.areashopreborn.persistence.HomeAccessRepository

public final class HomeAccessRepository extends Object
Stores explicit permission to use home teleports whose destination lies in a managed region.
  • Konstruktordetails

    • HomeAccessRepository

      public HomeAccessRepository(Database database)
      Creates the repository.
      Parameter:
      database - database owner
  • Methodendetails

    • grant

      public void grant(UUID regionId, UUID playerId, UUID actorId) throws SQLException
      Creates or refreshes an explicit grant.
      Parameter:
      regionId - target region
      playerId - permitted player
      actorId - actor issuing the grant
      Löst aus:
      SQLException - when persistence fails
    • revoke

      public boolean revoke(UUID regionId, UUID playerId) throws SQLException
      Removes an explicit grant.
      Parameter:
      regionId - target region
      playerId - player whose grant is removed
      Gibt zurück:
      whether a row was removed
      Löst aus:
      SQLException - when persistence fails
    • isGranted

      public boolean isGranted(UUID regionId, UUID playerId) throws SQLException
      Tests an explicit grant.
      Parameter:
      regionId - target region
      playerId - player to inspect
      Gibt zurück:
      whether the grant exists
      Löst aus:
      SQLException - when persistence fails
    • findGrantedPlayers

      public List<UUID> findGrantedPlayers(UUID regionId) throws SQLException
      Lists all explicitly permitted players for a region.
      Parameter:
      regionId - target region
      Gibt zurück:
      player identifiers in stable order
      Löst aus:
      SQLException - when persistence fails
    • findGrantedPlayers

      public List<UUID> findGrantedPlayers(UUID regionId, int limit) throws SQLException
      Lists a bounded prefix of explicit home grants.
      Parameter:
      regionId - target region
      limit - maximum player identifiers returned
      Gibt zurück:
      player identifiers in stable order
      Löst aus:
      SQLException - when persistence fails