Class ExpireManager

java.lang.Object
com.plotsquared.core.plot.expiration.ExpireManager

public class ExpireManager extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • addTask

      public void addTask(ExpiryTask task)
    • handleJoin

      public void handleJoin(PlotPlayer<?> pp)
    • handleEntry

      public void handleEntry(PlotPlayer<?> pp, Plot plot)
    • getAccountAge

      public long getAccountAge(UUID uuid)
      Gets the account last joined - first joined (or Long.MAX_VALUE)
      Parameters:
      uuid - player uuid
      Returns:
      result
    • getTimestamp

      public long getTimestamp(UUID uuid)
    • updateExpired

      public void updateExpired(Plot plot)
    • confirmExpiry

      public void confirmExpiry(PlotPlayer<?> pp)
    • cancelTask

      public boolean cancelTask()
    • runAutomatedTask

      public boolean runAutomatedTask()
    • isExpired

      public Collection<ExpiryTask> isExpired(ArrayDeque<ExpiryTask> applicable, Plot plot)
    • getTasks

      public ArrayDeque<ExpiryTask> getTasks(PlotArea area)
    • passesComplexity

      public void passesComplexity(PlotAnalysis analysis, Collection<ExpiryTask> applicable, RunnableVal<Boolean> success, Runnable failure)
    • runTask

      public boolean runTask(RunnableVal3<Plot,Runnable,Boolean> expiredTask)
    • storeDate

      public void storeDate(UUID uuid, long time)
    • getPendingExpired

      public HashSet<Plot> getPendingExpired()
    • deleteWithMessage

      public void deleteWithMessage(Plot plot, Runnable whenDone)
    • getAge

      @Deprecated(forRemoval=true, since="6.4.0") public long getAge(UUID uuid)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getAge

      public long getAge(UUID uuid, boolean shouldDeleteUnknownOwner)
      Get the age (last play time) of the passed player
      Parameters:
      uuid - the uuid of the owner to check against
      shouldDeleteUnknownOwner - true if an unknown player should be counted as never online
      Returns:
      the millis since the player was last online, or Long.MAX_VALUE if player was never online
      Since:
      6.4.0
    • getAge

      public long getAge(Plot plot, boolean shouldDeleteUnknownOwner)