Class UserManager
java.lang.Object
de.themoep.resourcepacksplugin.core.UserManager
Created by Phoenix616 on 04.11.2016.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addUserPack
(UUID playerId, ResourcePack pack) Set the resourcepack of a userclearUserPack
(UUID playerid) Deprecated.void
Remove all stored user pack dataclearUserPacks
(UUID playerId) Clear the resourcepacks of a usergetUserPack
(UUID playerid) Deprecated.Get the map of user IDs to pack namesgetUserPacks
(UUID playerid) Get the resourcepacks of a uservoid
What should happen when a player connects?void
onDisconnect
(UUID playerId) What should happen when a player disconnects?void
removeUserPack
(UUID playerId, ResourcePack pack) Remove a specific pack from a uservoid
removeUserPack
(UUID playerId, String packName) Remove a specific pack from a usersetUserPack
(UUID playerid, ResourcePack pack) Deprecated.void
updatePackTime
(UUID playerId) Update the time that the player got his pack
-
Constructor Details
-
UserManager
Manage user packs and settings- Parameters:
plugin
- The plugin instance
-
-
Method Details
-
getUserPack
Deprecated.Get the resourcepack of a user- Parameters:
playerid
- The UUID of this player- Returns:
- The resourcepack the player has selected, null if he has none/isn't known
-
getUserPacks
Get the resourcepacks of a user- Parameters:
playerid
- The UUID of this player- Returns:
- The resourcepack sthe player has selected, an empty list if there is none
-
setUserPack
Deprecated.Set the resourcepack of a user- Parameters:
playerid
- The UUID of this playerpack
- The resourcepack of the user- Returns:
- null for legacy reasons
-
addUserPack
Set the resourcepack of a user- Parameters:
playerId
- The UUID of this playerpack
- The resourcepack of the user- Returns:
- Whether the user already had that pack before
-
getUserPacks
Get the map of user IDs to pack names- Returns:
- The pack map
-
clearUserPack
Deprecated.Clear the resourcepack of a user- Parameters:
playerid
- The UUID of this player- Returns:
- Always null for legacy reasons
-
clearUserPacks
Clear the resourcepacks of a user- Parameters:
playerId
- The UUID of this player- Returns:
- The list of resourcepacks the player had selected previous, an empty list if he had none before
-
removeUserPack
Remove a specific pack from a user- Parameters:
playerId
- The UUID of the playerpack
- The pack to remove
-
removeUserPack
Remove a specific pack from a user- Parameters:
playerId
- The UUID of the playerpackName
- The name of the pack
-
clearUserPacks
public void clearUserPacks()Remove all stored user pack data -
onConnect
What should happen when a player connects?- Parameters:
playerId
- The UUID of the player
-
onDisconnect
What should happen when a player disconnects?- Parameters:
playerId
- The UUID of the player
-
updatePackTime
Update the time that the player got his pack- Parameters:
playerId
- The UUID of the player
-
clearUserPacks(UUID)