Package me.kzlyth.api.events.warn
Klasse PlayerWarnEvent
java.lang.Object
me.kzlyth.api.events.ZenithEvent
me.kzlyth.api.events.warn.PlayerWarnEvent
Event fired when a player is warned.
For detailed documentation and examples, see: https://docs.zenith-studios.org/
Example:
ZenithEventBus.getInstance().subscribe(PlayerWarnEvent.class, event -> {
getLogger().info(event.getPlayerName() + " was warned: " + event.getReason());
});
- Seit:
- 1.2.3
- Autor:
- Zenith-Studios
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung@Nullable StringGets the template key used for this warning.booleanChecks if this warning was issued using a template.Von Klasse geerbte Methoden me.kzlyth.api.events.ZenithEvent
getCaseId, getPlayer, getPlayerName, getPlayerUuid, getReason, getStaffName, getStaffPlayer, getStaffUuid, isCancelled, setCancelled
-
Konstruktordetails
-
PlayerWarnEvent
public PlayerWarnEvent(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull String playerName, @Nullable @Nullable UUID staffUuid, @NotNull @NotNull String staffName, @NotNull @NotNull String reason, int caseId, @Nullable @Nullable String templateKey) Constructs a new PlayerWarnEvent.- Parameter:
playerUuid- The UUID of the warned playerplayerName- The name of the warned playerstaffUuid- The UUID of the staff member (null for console)staffName- The name of the staff memberreason- The reason for the warningcaseId- The case IDtemplateKey- The template key (null if manual warning)
-
-
Methodendetails
-
getTemplateKey
Gets the template key used for this warning.- Gibt zurück:
- The template key, or null if manual warning
-
isTemplateWarning
public boolean isTemplateWarning()Checks if this warning was issued using a template.- Gibt zurück:
- True if template-based, false if manual
-