Class GracePeriodManager

java.lang.Object
org.strassburger.lifestealz.util.GracePeriodManager

public class GracePeriodManager extends Object
  • Constructor Details

    • GracePeriodManager

      public GracePeriodManager(LifeStealZ plugin)
  • Method Details

    • getConfig

    • isEnabled

      public boolean isEnabled()
    • isInGracePeriod

      public boolean isInGracePeriod(org.bukkit.entity.Player player)
      Checks if the player is in the grace period.
      Parameters:
      player - The player to check.
      Returns:
      True if the player is in the grace period, false otherwise.
    • getGracePeriodRemaining

      public Optional<Integer> getGracePeriodRemaining(org.bukkit.entity.Player player)
      Gets the remaining time of the grace period in seconds.
      Parameters:
      player - The player to get the grace period remaining time for.
      Returns:
      The remaining time of the grace period in seconds.
    • startGracePeriod

      public void startGracePeriod(org.bukkit.entity.Player player)
      Sends the player a message and executes commands when the grace period starts.
      Parameters:
      player - The player to start the grace period for.
    • endGracePeriod

      public void endGracePeriod(org.bukkit.entity.Player player)
      Sends the player a message and executes commands when the grace period ends.
      Parameters:
      player - The player to end the grace period for.
    • skipGracePeriod

      public boolean skipGracePeriod(org.bukkit.entity.Player player)
      Skips the grace period for the player.
      Parameters:
      player - The player to skip the grace period for.
      Returns:
      True if the grace period was skipped, false otherwise.
    • resetGracePeriod

      public boolean resetGracePeriod(org.bukkit.entity.Player player)
      Resets the grace period for the player.
      Parameters:
      player - The player to reset the grace period for.
      Returns:
      True if the grace period was reset, false otherwise.