Package fr.fuzeblocks.homeplugin.cache
Class CacheManager
java.lang.Object
fr.fuzeblocks.homeplugin.cache.CacheManager
The type Cache manager.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd home.voidaddRtpRequest(UUID playerId, Long timestamp) Add rtp request.voidaddTpaRequest(UUID sender, UUID target) Add tpa request.voidClear all homes.voidclearHomes(UUID playerId) Clear homes.voidClear spawn.Gets all rtp requests.Gets all tpa senders.Gets homes.static CacheManagerGets instance.getRtpRequest(UUID playerId) Gets rtp request.getSenderForTarget(UUID target) Gets sender for target.org.bukkit.LocationgetSpawn()Gets spawn.getTargetWithSender(UUID sender) Gets target with sender.getTpaTarget(UUID senderId) Gets tpa target.booleanhasIncomingTpa(UUID target) Has incoming tpa boolean.booleanhasRtpRequest(UUID playerId) Has rtp request boolean.booleanhasTpaRequest(UUID sender, UUID target) Has tpa request boolean.booleanIs using redis boolean.voidloadAllHomesToCache(org.bukkit.entity.Player player) Charge toutes les homes du joueur depuis HomeManager et les ajoute au cache.voidrelocateHome(UUID playerId, String homeName, org.bukkit.Location newLocation) Relocate home.voidremoveHome(UUID playerId, String homeName) Remove home.voidremoveRtpRequest(UUID playerId) Remove rtp request.voidremoveTpaRequest(UUID sender, UUID target) Remove tpa request.voidsetSpawn(org.bukkit.Location location) Sets spawn.
-
Method Details
-
getInstance
Gets instance.- Returns:
- the instance
-
addTpaRequest
Add tpa request.- Parameters:
sender- the sendertarget- the target
-
hasTpaRequest
Has tpa request boolean.- Parameters:
sender- the sendertarget- the target- Returns:
- the boolean
-
removeTpaRequest
Remove tpa request.- Parameters:
sender- the sendertarget- the target
-
getTargetWithSender
Gets target with sender.- Parameters:
sender- the sender- Returns:
- the target with sender
-
hasIncomingTpa
Has incoming tpa boolean.- Parameters:
target- the target- Returns:
- the boolean
-
getSenderForTarget
Gets sender for target.- Parameters:
target- the target- Returns:
- the sender for target
-
getTpaTarget
Gets tpa target.- Parameters:
senderId- the sender id- Returns:
- the tpa target
-
getAllTpaSenders
Gets all tpa senders.- Returns:
- the all tpa senders
-
addHome
Add home.- Parameters:
playerId- the player idhomeName- the home namelocation- the location
-
removeHome
Remove home.- Parameters:
playerId- the player idhomeName- the home name
-
relocateHome
Relocate home.- Parameters:
playerId- the player idhomeName- the home namenewLocation- the new location
-
getHomes
Gets homes.- Parameters:
playerId- the player id- Returns:
- the homes
-
clearHomes
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
Add rtp request.- Parameters:
playerId- the player idtimestamp- the timestamp
-
getRtpRequest
Gets rtp request.- Parameters:
playerId- the player id- Returns:
- the rtp request
-
removeRtpRequest
Remove rtp request.- Parameters:
playerId- the player id
-
hasRtpRequest
Has rtp request boolean.- Parameters:
playerId- the player id- Returns:
- the boolean
-
getAllRtpRequests
Gets all rtp requests.- Returns:
- the all rtp requests
-
isUsingRedis
public boolean isUsingRedis()Is using redis boolean.- Returns:
- the boolean
-