9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-19 15:09:19 +00:00

docs(PlayerCosmeticPostEquipEvent): improve Javadocs

This commit is contained in:
Craftinators
2025-01-22 11:05:56 -05:00
parent c591641754
commit e7b1fda73e

View File

@@ -5,8 +5,12 @@ import com.hibiscusmc.hmccosmetics.user.CosmeticUser;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/**
* Called when a player has equipped a {@link Cosmetic}
*/
public class PlayerCosmeticPostEquipEvent extends PlayerCosmeticEvent { public class PlayerCosmeticPostEquipEvent extends PlayerCosmeticEvent {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private Cosmetic cosmetic; private Cosmetic cosmetic;
public PlayerCosmeticPostEquipEvent(@NotNull CosmeticUser who, @NotNull 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 @NotNull Cosmetic getCosmetic() {
public Cosmetic getCosmetic() {
return cosmetic; 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) { public void setCosmetic(@NotNull Cosmetic cosmetic) {
this.cosmetic = cosmetic; this.cosmetic = cosmetic;
} }
@Override @Override
@NotNull public @NotNull HandlerList getHandlers() {
public HandlerList getHandlers() { return HANDLER_LIST;
return handlers;
} }
@NotNull public static @NotNull HandlerList getHandlerList() {
public static HandlerList getHandlerList() { return HANDLER_LIST;
return handlers;
} }
} }