From e7b1fda73e433090c4e4b20fe99956180cdc3773 Mon Sep 17 00:00:00 2001 From: Craftinators Date: Wed, 22 Jan 2025 11:05:56 -0500 Subject: [PATCH] docs(PlayerCosmeticPostEquipEvent): improve Javadocs --- .../events/PlayerCosmeticPostEquipEvent.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/api/events/PlayerCosmeticPostEquipEvent.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/api/events/PlayerCosmeticPostEquipEvent.java index 55b93234..d0fddf7d 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/api/events/PlayerCosmeticPostEquipEvent.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/api/events/PlayerCosmeticPostEquipEvent.java @@ -5,8 +5,12 @@ import com.hibiscusmc.hmccosmetics.user.CosmeticUser; import org.bukkit.event.HandlerList; import org.jetbrains.annotations.NotNull; +/** + * Called when a player has equipped a {@link Cosmetic} + */ public class PlayerCosmeticPostEquipEvent extends PlayerCosmeticEvent { - private static final HandlerList handlers = new HandlerList(); + private static final HandlerList HANDLER_LIST = new HandlerList(); + private Cosmetic cosmetic; public PlayerCosmeticPostEquipEvent(@NotNull CosmeticUser who, @NotNull Cosmetic cosmetic) { @@ -15,32 +19,29 @@ public class PlayerCosmeticPostEquipEvent extends PlayerCosmeticEvent { } /** - * Gets the {@link Cosmetic} being equipped in this event + * Gets the {@link Cosmetic} being equipped in this event. * - * @return The {@link Cosmetic} which is being equipped in this event + * @return the {@link Cosmetic} which is being equipped in this event */ - @NotNull - public Cosmetic getCosmetic() { + public @NotNull Cosmetic getCosmetic() { return cosmetic; } /** - * Sets the {@link Cosmetic} that the player will equip + * Sets the {@link Cosmetic} that the player will equip. * - * @param cosmetic The {@link Cosmetic} that the player will equip + * @param cosmetic the {@link Cosmetic} that the player will equip */ public void setCosmetic(@NotNull Cosmetic cosmetic) { this.cosmetic = cosmetic; } @Override - @NotNull - public HandlerList getHandlers() { - return handlers; + public @NotNull HandlerList getHandlers() { + return HANDLER_LIST; } - @NotNull - public static HandlerList getHandlerList() { - return handlers; + public static @NotNull HandlerList getHandlerList() { + return HANDLER_LIST; } }