Interface HomeManager


public interface HomeManager
The homes system. Get it from EssentialsCAPI.getHomeManager(). Reads are cached and async, writes go through the same checks as the commands.
  • Method Details

    • isHomeSystemEnabled

      boolean isHomeSystemEnabled()
      Checks if homes are enabled.
      Returns:
      true if enabled
    • fetchHome

      CompletableFuture<Home> fetchHome(UUID owner, String name)
      Gets one home.
      Parameters:
      owner - the owner UUID
      name - the home name
      Returns:
      future with the home, or null if missing
    • fetchHomes

      CompletableFuture<List<Home>> fetchHomes(UUID owner)
      Gets all homes of a player.
      Parameters:
      owner - the owner UUID
      Returns:
      future with the homes, empty if none
    • homeExists

      CompletableFuture<Boolean> homeExists(UUID owner, String name)
      Checks if a home exists.
      Parameters:
      owner - the owner UUID
      name - the home name
      Returns:
      future with true if it exists
    • getHomeCount

      CompletableFuture<Integer> getHomeCount(UUID owner)
      Counts a player's homes.
      Parameters:
      owner - the owner UUID
      Returns:
      future with the count
    • setHome

      CompletableFuture<Boolean> setHome(org.bukkit.entity.Player player, String name, org.bukkit.Location location)
      Sets a home for an online player.
      Parameters:
      player - the owner, must be online
      name - the home name
      location - the home location
      Returns:
      future with true on success
    • setHome

      CompletableFuture<Boolean> setHome(UUID owner, String name, org.bukkit.Location location)
      Sets a home by UUID, works offline too.
      Parameters:
      owner - the owner UUID
      name - the home name
      location - the home location
      Returns:
      future with true on success
    • deleteHome

      CompletableFuture<Boolean> deleteHome(UUID owner, String name)
      Deletes a home.
      Parameters:
      owner - the owner UUID
      name - the home name
      Returns:
      future with true if something was deleted
    • getMaxHomes

      int getMaxHomes(org.bukkit.entity.Player player)
      Gets how many homes a player may have.
      Parameters:
      player - the player
      Returns:
      max homes
    • getCachedHomeNames

      Collection<String> getCachedHomeNames(UUID owner)
      Gets cached home names without hitting storage.
      Parameters:
      owner - the owner UUID
      Returns:
      cached home names
    • clearCache

      void clearCache(UUID owner)
      Clears a player's home cache.
      Parameters:
      owner - the owner UUID
    • isOnCooldown

      boolean isOnCooldown(org.bukkit.entity.Player player)
      Checks if the player is on home cooldown.
      Parameters:
      player - the player
      Returns:
      true if on cooldown
    • getRemainingCooldownSeconds

      long getRemainingCooldownSeconds(org.bukkit.entity.Player player)
      Gets remaining home cooldown in seconds, 0 if none.
      Parameters:
      player - the player
      Returns:
      remaining seconds
    • hasPendingTeleport

      boolean hasPendingTeleport(org.bukkit.entity.Player player)
      Checks if the player has a teleport warming up.
      Parameters:
      player - the player
      Returns:
      true if a teleport is pending
    • cancelTeleport

      void cancelTeleport(org.bukkit.entity.Player player)
      Cancels the player's pending teleport, if any.
      Parameters:
      player - the player
    • startTeleport

      void startTeleport(org.bukkit.entity.Player player, Home home)
      Starts a home teleport with warmup and cooldown.
      Parameters:
      player - the player
      home - the destination
    • reload

      void reload()
      Reloads home config from disk.