java.lang.Object
me.github.simonplays15.betterbansystem.core.warn.WarnHandler

public class WarnHandler extends Object
The WarnHandler class provides methods for adding and removing warnings for a target player. Warnings are associated with a target player and can be issued by a command sender. Warnings consist of a reason and a unique identifier.
  • Constructor Details

    • WarnHandler

      public WarnHandler()
  • Method Details

    • addWarn

      public static void addWarn (@NotNull @NotNull BaseCommandSender sender, String target, String reason)
      Adds a warning for a target player with a given reason.
      Parameters:
      sender - the command sender issuing the warning
      target - the name or UUID of the target player
      reason - the reason for the warning
    • removeWarn

      public static void removeWarn (String target, int id)
      Removes a specific warning from the target players warn entry.
      Parameters:
      target - The name of the target player.
      id - The unique identifier of the warning to be removed.