All Known Implementing Classes:
ReasonProvider

public sealed interface Reason permits ReasonProvider
The Reason interface provides methods to give Reason for the ban/mute system.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(String reason)
    Adds a reason.
    boolean
    exists(int id)
    Checks if a reason with the specified ID exists.
    get(int id)
    Retrieves a reason by its ID.
    void
    remove(int id)
    Removes a reason.
    void
    update(int id, String reason)
    Updates the reason with the specified ID.
  • Method Details

    • exists

      boolean exists(int id)
      Checks if a reason with the specified ID exists.
      Parameters:
      id - The ID of the reason to check.
      Returns:
      True if a reason with the specified ID exists, false otherwise.
    • add

      void add(String reason)
      Adds a reason.
      Parameters:
      reason - The reason to be added.
    • remove

      void remove(int id)
      Removes a reason.
      Parameters:
      id - The ID of the reason to be removed.
    • update

      void update(int id, String reason)
      Updates the reason with the specified ID.
      Parameters:
      id - The ID of the reason to update.
      reason - The updated reason.
    • get

      String get(int id)
      Retrieves a reason by its ID.
      Parameters:
      id - The ID of the reason to retrieve.
      Returns:
      The reason associated with the specified ID, represented as a string.