Class UserManager

java.lang.Object
de.themoep.resourcepacksplugin.core.UserManager

public class UserManager extends Object
Created by Phoenix616 on 04.11.2016.
  • Constructor Details

    • UserManager

      public UserManager(ResourcepacksPlugin plugin)
      Manage user packs and settings
      Parameters:
      plugin - The plugin instance
  • Method Details

    • getUserPack

      @Deprecated public ResourcePack getUserPack(UUID playerid)
      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

      public List<ResourcePack> getUserPacks(UUID playerid)
      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 public ResourcePack setUserPack(UUID playerid, ResourcePack pack)
      Set the resourcepack of a user
      Parameters:
      playerid - The UUID of this player
      pack - The resourcepack of the user
      Returns:
      null for legacy reasons
    • addUserPack

      public boolean addUserPack(UUID playerId, ResourcePack pack)
      Set the resourcepack of a user
      Parameters:
      playerId - The UUID of this player
      pack - The resourcepack of the user
      Returns:
      Whether the user already had that pack before
    • getUserPacks

      public com.google.common.collect.Multimap<UUID,String> getUserPacks()
      Get the map of user IDs to pack names
      Returns:
      The pack map
    • clearUserPack

      @Deprecated public ResourcePack clearUserPack(UUID playerid)
      Deprecated.
      Clear the resourcepack of a user
      Parameters:
      playerid - The UUID of this player
      Returns:
      Always null for legacy reasons
    • clearUserPacks

      public Collection<String> clearUserPacks(UUID playerId)
      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

      public void removeUserPack(UUID playerId, ResourcePack pack)
      Remove a specific pack from a user
      Parameters:
      playerId - The UUID of the player
      pack - The pack to remove
    • removeUserPack

      public void removeUserPack(UUID playerId, String packName)
      Remove a specific pack from a user
      Parameters:
      playerId - The UUID of the player
      packName - The name of the pack
    • clearUserPacks

      public void clearUserPacks()
      Remove all stored user pack data
    • onConnect

      public void onConnect(UUID playerId)
      What should happen when a player connects?
      Parameters:
      playerId - The UUID of the player
    • onDisconnect

      public void onDisconnect(UUID playerId)
      What should happen when a player disconnects?
      Parameters:
      playerId - The UUID of the player
    • updatePackTime

      public void updatePackTime(UUID playerId)
      Update the time that the player got his pack
      Parameters:
      playerId - The UUID of the player