Interface WarpManager


public interface WarpManager
The warp system. Get it from EssentialsCAPI.getWarpManager(). If warps are disabled lookups come back empty and writes return false.
  • Method Details

    • isWarpSystemEnabled

      boolean isWarpSystemEnabled()
      Checks if warps are enabled.
      Returns:
      true if enabled
    • getWarp

      Warp getWarp(String name)
      Gets a warp by name.
      Parameters:
      name - the warp name
      Returns:
      the warp, or null if missing
    • warpExists

      boolean warpExists(String name)
      Checks if a warp exists.
      Parameters:
      name - the warp name
      Returns:
      true if it exists
    • getAllWarps

      Collection<Warp> getAllWarps()
      Gets all warps, including hidden ones.
      Returns:
      all warps, never null
    • getVisibleWarps

      Collection<Warp> getVisibleWarps()
      Gets only public warps.
      Returns:
      visible warps, never null
    • getWarpsByCategory

      Collection<Warp> getWarpsByCategory(String category)
      Gets warps in one category.
      Parameters:
      category - the category name
      Returns:
      warps in the category, empty if none
    • getCategories

      Set<String> getCategories()
      Gets all category names.
      Returns:
      category names, never null
    • createWarp

      CompletableFuture<Boolean> createWarp(String name, org.bukkit.Location location)
      Creates a warp.
      Parameters:
      name - the warp name
      location - the warp location
      Returns:
      future with true on success
    • deleteWarp

      CompletableFuture<Boolean> deleteWarp(String name)
      Deletes a warp.
      Parameters:
      name - the warp name
      Returns:
      future with true if something was deleted
    • updateWarp

      CompletableFuture<Boolean> updateWarp(Warp warp)
      Saves changes made to a warp.
      Parameters:
      warp - the changed warp
      Returns:
      future with true on success
    • getWarpUsage

      CompletableFuture<Integer> getWarpUsage(UUID playerId, String warpName)
      Counts how often a player used a warp.
      Parameters:
      playerId - the player UUID
      warpName - the warp name
      Returns:
      future with the usage count
    • isOnCooldown

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

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

      boolean hasPendingWarp(org.bukkit.entity.Player player)
      Checks if the player has a warp warming up.
      Parameters:
      player - the player
      Returns:
      true if pending
    • cancelWarp

      void cancelWarp(org.bukkit.entity.Player player)
      Cancels the player's pending warp, if any.
      Parameters:
      player - the player
    • reload

      void reload()
      Reloads warps from disk.