Class WarpSQLManager

java.lang.Object
fr.fuzeblocks.homeplugin.core.warps.sql.WarpSQLManager
All Implemented Interfaces:
Warp

public class WarpSQLManager extends Object implements Warp
The type Warp sql manager.
  • Constructor Details

    • WarpSQLManager

      public WarpSQLManager()
  • Method Details

    • addWarp

      public boolean addWarp(String name, String creatorName, UUID creatorUUID, org.bukkit.Material icon, List<String> lores, boolean isPublic, Set<UUID> deniedPlayers, double cost, String permission, Timestamp expirationDate, Timestamp creationDate, org.bukkit.Location location)
      Description copied from interface: Warp
      Add warp boolean.
      Specified by:
      addWarp in interface Warp
      Parameters:
      name - the name
      creatorName - the creator name
      creatorUUID - the creator uuid
      icon - the icon
      lores - the lores
      isPublic - the is public
      deniedPlayers - the allowed players
      cost - the cost
      permission - the permission
      expirationDate - the expiration date
      creationDate - the creation date
      location - the location
      Returns:
      the boolean
    • addWarp

      public boolean addWarp(String serializedData)
      Description copied from interface: Warp
      Parse and add a warp from serialized data (e.g. from a file/DB). The exact format is implementation-dependent.
      Specified by:
      addWarp in interface Warp
      Parameters:
      serializedData - the serialized data
      Returns:
      the boolean
    • addWarp

      public boolean addWarp(WarpData warpData)
      Description copied from interface: Warp
      Add warp boolean.
      Specified by:
      addWarp in interface Warp
      Parameters:
      warpData - the warp data
      Returns:
      the boolean
    • deleteWarp

      public boolean deleteWarp(String name)
      Description copied from interface: Warp
      Delete warp boolean.
      Specified by:
      deleteWarp in interface Warp
      Parameters:
      name - the name
      Returns:
      the boolean
    • deleteWarp

      public boolean deleteWarp(WarpData warpData)
      Description copied from interface: Warp
      Delete warp boolean.
      Specified by:
      deleteWarp in interface Warp
      Parameters:
      warpData - the warp data
      Returns:
      the boolean
    • renameWarp

      public boolean renameWarp(String oldName, String newName)
      Description copied from interface: Warp
      Rename warp boolean.
      Specified by:
      renameWarp in interface Warp
      Parameters:
      oldName - the old name
      newName - the new name
      Returns:
      the boolean
    • renameWarp

      public boolean renameWarp(WarpData warpData, String newName)
      Description copied from interface: Warp
      Rename warp boolean.
      Specified by:
      renameWarp in interface Warp
      Parameters:
      warpData - the warp data
      newName - the new name
      Returns:
      the boolean
    • relocateWarp

      public boolean relocateWarp(String name, org.bukkit.Location newLocation)
      Description copied from interface: Warp
      Relocate warp boolean.
      Specified by:
      relocateWarp in interface Warp
      Parameters:
      name - the name
      newLocation - the new location
      Returns:
      the boolean
    • relocateWarp

      public boolean relocateWarp(WarpData warpData, org.bukkit.Location newLocation)
      Description copied from interface: Warp
      Relocate warp boolean.
      Specified by:
      relocateWarp in interface Warp
      Parameters:
      warpData - the warp data
      newLocation - the new location
      Returns:
      the boolean
    • setWarpIcon

      public boolean setWarpIcon(String name, org.bukkit.Material newIcon)
      Description copied from interface: Warp
      Sets warp icon.
      Specified by:
      setWarpIcon in interface Warp
      Parameters:
      name - the name
      newIcon - the new icon
      Returns:
      the warp icon
    • setWarpIcon

      public boolean setWarpIcon(WarpData warpData, org.bukkit.Material newIcon)
      Description copied from interface: Warp
      Sets warp icon.
      Specified by:
      setWarpIcon in interface Warp
      Parameters:
      warpData - the warp data
      newIcon - the new icon
      Returns:
      the warp icon
    • setWarpLores

      public boolean setWarpLores(String serializedData, List<String> newLores)
      Description copied from interface: Warp
      Sets warp lores.
      Specified by:
      setWarpLores in interface Warp
      Parameters:
      serializedData - the serialized data
      newLores - the new lores
      Returns:
      the warp lores
    • setWarpLores

      public boolean setWarpLores(WarpData warpData, List<String> newLores)
      Description copied from interface: Warp
      Sets warp lores.
      Specified by:
      setWarpLores in interface Warp
      Parameters:
      warpData - the warp data
      newLores - the new lores
      Returns:
      the warp lores
    • setWarpPublic

      public boolean setWarpPublic(String name, boolean isPublic)
      Description copied from interface: Warp
      Sets warp public.
      Specified by:
      setWarpPublic in interface Warp
      Parameters:
      name - the name
      isPublic - the is public
      Returns:
      the warp public
    • setWarpPublic

      public boolean setWarpPublic(WarpData warpData, boolean isPublic)
      Description copied from interface: Warp
      Sets warp public.
      Specified by:
      setWarpPublic in interface Warp
      Parameters:
      warpData - the warp data
      isPublic - the is public
      Returns:
      the warp public
    • setDeniedPlayers

      public boolean setDeniedPlayers(String name, Set<UUID> deniedPlayers)
      Specified by:
      setDeniedPlayers in interface Warp
    • setDeniedPlayers

      public boolean setDeniedPlayers(WarpData warpData, Set<UUID> deniedPlayers)
      Specified by:
      setDeniedPlayers in interface Warp
    • setWarpCost

      public boolean setWarpCost(String name, double cost)
      Description copied from interface: Warp
      Sets warp cost.
      Specified by:
      setWarpCost in interface Warp
      Parameters:
      name - the name
      cost - the cost
      Returns:
      the warp cost
    • setWarpCost

      public boolean setWarpCost(WarpData warpData, double cost)
      Description copied from interface: Warp
      Sets warp cost.
      Specified by:
      setWarpCost in interface Warp
      Parameters:
      warpData - the warp data
      cost - the cost
      Returns:
      the warp cost
    • setWarpPermission

      public boolean setWarpPermission(String name, String permission)
      Description copied from interface: Warp
      Sets warp permission.
      Specified by:
      setWarpPermission in interface Warp
      Parameters:
      name - the name
      permission - the permission
      Returns:
      the warp permission
    • setWarpPermission

      public boolean setWarpPermission(WarpData warpData, String permission)
      Description copied from interface: Warp
      Sets warp permission.
      Specified by:
      setWarpPermission in interface Warp
      Parameters:
      warpData - the warp data
      permission - the permission
      Returns:
      the warp permission
    • setWarpExpirationDate

      public boolean setWarpExpirationDate(String name, Timestamp expirationDate)
      Description copied from interface: Warp
      Sets warp expiration date.
      Specified by:
      setWarpExpirationDate in interface Warp
      Parameters:
      name - the name
      expirationDate - the expiration date
      Returns:
      the warp expiration date
    • setWarpExpirationDate

      public boolean setWarpExpirationDate(WarpData warpData, Timestamp expirationDate)
      Description copied from interface: Warp
      Sets warp expiration date.
      Specified by:
      setWarpExpirationDate in interface Warp
      Parameters:
      warpData - the warp data
      expirationDate - the expiration date
      Returns:
      the warp expiration date
    • warpExists

      public boolean warpExists(String name)
      Description copied from interface: Warp
      Warp exists boolean.
      Specified by:
      warpExists in interface Warp
      Parameters:
      name - the name
      Returns:
      the boolean
    • warpExists

      public boolean warpExists(WarpData warpData)
      Description copied from interface: Warp
      Warp exists boolean.
      Specified by:
      warpExists in interface Warp
      Parameters:
      warpData - the warp data
      Returns:
      the boolean
    • getWarp

      public WarpData getWarp(String name)
      Description copied from interface: Warp
      Get full warp data object by name, or null if not found.
      Specified by:
      getWarp in interface Warp
      Parameters:
      name - the name
      Returns:
      the warp
    • getAllWarps

      public Map<String,WarpData> getAllWarps()
      Description copied from interface: Warp
      Get a map of all warps by name.
      Specified by:
      getAllWarps in interface Warp
      Returns:
      the all warps
    • getWarpNames

      public Set<String> getWarpNames()
      Description copied from interface: Warp
      Convenience: list only the names of all warps.
      Specified by:
      getWarpNames in interface Warp
      Returns:
      the warp names
    • isExpired

      public boolean isExpired(String name)
      Specified by:
      isExpired in interface Warp
    • isExpired

      public boolean isExpired(WarpData warpData)
      Specified by:
      isExpired in interface Warp