Klasse PlayerWarnEvent

java.lang.Object
me.kzlyth.api.events.ZenithEvent
me.kzlyth.api.events.warn.PlayerWarnEvent

public class PlayerWarnEvent extends ZenithEvent
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
  • 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 player
      playerName - The name of the warned player
      staffUuid - The UUID of the staff member (null for console)
      staffName - The name of the staff member
      reason - The reason for the warning
      caseId - The case ID
      templateKey - The template key (null if manual warning)
  • Methodendetails

    • getTemplateKey

      @Nullable public @Nullable String 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