Class WarnHandler
java.lang.Object
me.github.simonplays15.betterbansystem.core.warn.WarnHandler
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addWarn
(@NotNull BaseCommandSender sender, String target, String reason) Adds a warning for a target player with a given reason.static void
removeWarn
(String target, int id) Removes a specific warning from the target players warn entry.
-
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 warningtarget
- the name or UUID of the target playerreason
- the reason for the warning
-
removeWarn
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.
-