Class CacheManager

java.lang.Object
fr.fuzeblocks.homeplugin.cache.CacheManager

public class CacheManager extends Object
The type Cache manager.
  • Method Details

    • getInstance

      public static CacheManager getInstance()
      Gets instance.
      Returns:
      the instance
    • addTpaRequest

      public void addTpaRequest(UUID sender, UUID target)
      Add tpa request.
      Parameters:
      sender - the sender
      target - the target
    • hasTpaRequest

      public boolean hasTpaRequest(UUID sender, UUID target)
      Has tpa request boolean.
      Parameters:
      sender - the sender
      target - the target
      Returns:
      the boolean
    • removeTpaRequest

      public void removeTpaRequest(UUID sender, UUID target)
      Remove tpa request.
      Parameters:
      sender - the sender
      target - the target
    • getTargetWithSender

      public UUID getTargetWithSender(UUID sender)
      Gets target with sender.
      Parameters:
      sender - the sender
      Returns:
      the target with sender
    • hasIncomingTpa

      public boolean hasIncomingTpa(UUID target)
      Has incoming tpa boolean.
      Parameters:
      target - the target
      Returns:
      the boolean
    • getSenderForTarget

      public UUID getSenderForTarget(UUID target)
      Gets sender for target.
      Parameters:
      target - the target
      Returns:
      the sender for target
    • getTpaTarget

      public UUID getTpaTarget(UUID senderId)
      Gets tpa target.
      Parameters:
      senderId - the sender id
      Returns:
      the tpa target
    • getAllTpaSenders

      public Set<UUID> getAllTpaSenders()
      Gets all tpa senders.
      Returns:
      the all tpa senders
    • addHome

      public void addHome(UUID playerId, String homeName, org.bukkit.Location location)
      Add home.
      Parameters:
      playerId - the player id
      homeName - the home name
      location - the location
    • removeHome

      public void removeHome(UUID playerId, String homeName)
      Remove home.
      Parameters:
      playerId - the player id
      homeName - the home name
    • getHomes

      public Map<String,org.bukkit.Location> getHomes(UUID playerId)
      Gets homes.
      Parameters:
      playerId - the player id
      Returns:
      the homes
    • clearHomes

      public void clearHomes(UUID playerId)
      Clear homes.
      Parameters:
      playerId - the player id
    • clearAllHomes

      public void clearAllHomes()
      Clear all homes.
    • loadAllHomesToCache

      public void loadAllHomesToCache(org.bukkit.entity.Player player)
      Charge toutes les homes du joueur depuis HomeManager et les ajoute au cache.
      Parameters:
      player - Joueur concerné
    • setSpawn

      public void setSpawn(org.bukkit.Location location)
      Sets spawn.
      Parameters:
      location - the location
    • getSpawn

      public org.bukkit.Location getSpawn()
      Gets spawn.
      Returns:
      the spawn
    • clearSpawn

      public void clearSpawn()
      Clear spawn.
    • addRtpRequest

      public void addRtpRequest(UUID playerId, Long timestamp)
      Add rtp request.
      Parameters:
      playerId - the player id
      timestamp - the timestamp
    • getRtpRequest

      public Long getRtpRequest(UUID playerId)
      Gets rtp request.
      Parameters:
      playerId - the player id
      Returns:
      the rtp request
    • removeRtpRequest

      public void removeRtpRequest(UUID playerId)
      Remove rtp request.
      Parameters:
      playerId - the player id
    • hasRtpRequest

      public boolean hasRtpRequest(UUID playerId)
      Has rtp request boolean.
      Parameters:
      playerId - the player id
      Returns:
      the boolean
    • getAllRtpRequests

      public Map<UUID,Long> getAllRtpRequests()
      Gets all rtp requests.
      Returns:
      the all rtp requests
    • isUsingRedis

      public boolean isUsingRedis()
      Is using redis boolean.
      Returns:
      the boolean