Class StatusManager

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

public class StatusManager extends de.themoep.resourcepacksplugin.core.UserManager
  • Constructor Details

  • Method Details

    • setStatus

      @Deprecated public ResourcePackStatus setStatus(UUID playerId, ResourcePackStatus status)
      Set the last resource pack status send by a player by his id
      Parameters:
      playerId - The UUID of the player
      status - The status
      Returns:
      The previous ResourcePackStatus; null if the player has none
    • setStatus

      public ResourcePackStatus setStatus(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack, ResourcePackStatus status)
      Set the last resource pack status send by a player by his id
      Parameters:
      playerId - The UUID of the player
      pack - The pack
      status - The status
      Returns:
      The previous ResourcePackStatus; null if the player has none
    • getStatus

      @Deprecated public ResourcePackStatus getStatus(UUID playerId)
      Deprecated.
      Get the last resource pack status send by a player by his id
      Parameters:
      playerId - The UUID of the player
      Returns:
      The ResourcePackStatus; null if the player has none
    • getStatus

      public ResourcePackStatus getStatus(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
      Get the last resource pack status send by a player by his id
      Parameters:
      playerId - The UUID of the player
      pack - The pack
      Returns:
      The ResourcePackStatus; null if the player has none
    • getStatuses

      public Map<UUID,ResourcePackStatus> getStatuses(UUID playerId)
      Get the last resource pack statuses send by a player by his id
      Parameters:
      playerId - The UUID of the player
      Returns:
      The ResourcePackStatuses, empty map if they have none
    • clearStatuses

      public Map<UUID,ResourcePackStatus> clearStatuses(UUID playerId)
      Remove a player's status completely
      Parameters:
      playerId - The UUID of the player
      Returns:
      The previous ResourcePackStatuses; null if the player did not have one
    • clearStatus

      public ResourcePackStatus clearStatus(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
      Remove a player's status completely
      Parameters:
      playerId - The UUID of the player
      pack - The pack
      Returns:
      The previous ResourcePackStatus; null if the player did not have one
    • removeUserPack

      public void removeUserPack(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
      Overrides:
      removeUserPack in class de.themoep.resourcepacksplugin.core.UserManager
    • clearUserPacks

      public void clearUserPacks()
      Overrides:
      clearUserPacks in class de.themoep.resourcepacksplugin.core.UserManager
    • setPromptTimeout

      public void setPromptTimeout(int promptTimeout)
    • getPromptTimeout

      public int getPromptTimeout()
    • startTimeout

      public void startTimeout(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
    • stopTimeout

      public void stopTimeout(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
    • stopTimeouts

      public void stopTimeouts(UUID playerId)
    • checkForPackRemoval

      public boolean checkForPackRemoval(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack, ResourcePackStatus status)
      Remove the cached pack if the status is one that ends up with the player not having a pack
      Parameters:
      playerId - The UUID of the player
      pack - The pack
      status - The status
      Returns:
      Whether the pack was removed or not