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

      public ResourcePack getUserPack(UUID playerid)
      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
    • setUserPack

      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:
      The resourcepack the player had selected previous, null if he had none before
    • getUserPacks

      public Map<UUID,​String> getUserPacks()
      Get the map of user IDs to pack names
      Returns:
      The pack map
    • clearUserPack

      public ResourcePack clearUserPack(UUID playerid)
      Clear the resourcepack of a user
      Parameters:
      playerid - The UUID of this player
      Returns:
      The resourcepack the player had selected previous, null if he had none before
    • 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