java.lang.Object
me.github.simonplays15.betterbansystem.core.ban.BanManager

public class BanManager extends Object
BanManager class is responsible for managing bans and checking for expired ban entries.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BanManager is responsible for managing bans and checking for expired ban entries.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Starts the BanManager and schedules tasks to check for expired ban entries.
    void
    stop()
    Shuts down the scheduler and ensures all scheduled tasks are completed or canceled within 5 seconds.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BanManager

      public BanManager()
      BanManager is responsible for managing bans and checking for expired ban entries. It has a start method that schedules tasks to check for expired ban entries periodically, and a stop method to shut down the scheduler.
  • Method Details

    • start

      public void start()
      Starts the BanManager and schedules tasks to check for expired ban entries.
    • stop

      public void stop()
      Shuts down the scheduler and ensures all scheduled tasks are completed or canceled within 5 seconds. If the tasks do not complete within 5 seconds, the scheduler is forcibly shutdown.

      If an InterruptedException occurs during the termination process, the scheduler is forcibly shutdown and an error message is written to the logger.