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

docs: Minor javadoc changes to most of the api directory

This commit is contained in:
Craftinators
2025-01-22 15:28:26 -05:00
parent a037487497
commit 34237e0a45
15 changed files with 131 additions and 187 deletions

View File

@@ -6,8 +6,6 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.List;
/** /**
* Called when a player equips a {@link Cosmetic}. * Called when a player equips a {@link Cosmetic}.
*/ */
@@ -26,7 +24,7 @@ public class PlayerCosmeticEquipEvent extends PlayerCosmeticEvent implements Can
/** /**
* 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 cosmetic which is being equipped in this event
*/ */
@NotNull @NotNull
public Cosmetic getCosmetic() { public Cosmetic getCosmetic() {
@@ -36,7 +34,7 @@ public class PlayerCosmeticEquipEvent extends PlayerCosmeticEvent implements Can
/** /**
* 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 cosmetic that the player will equip
*/ */
public void setCosmetic(@NotNull Cosmetic cosmetic) { public void setCosmetic(@NotNull Cosmetic cosmetic) {
this.cosmetic = cosmetic; this.cosmetic = cosmetic;

View File

@@ -23,7 +23,7 @@ public class PlayerCosmeticHideEvent extends PlayerCosmeticEvent implements Canc
/** /**
* Gets the {@link CosmeticUser.HiddenReason} as to why cosmetics are being hidden for the player. * Gets the {@link CosmeticUser.HiddenReason} as to why cosmetics are being hidden for the player.
* *
* @return the {@link CosmeticUser.HiddenReason} why cosmetics are being hidden for the player * @return the reason why cosmetics are being hidden for the player
*/ */
public @NotNull CosmeticUser.HiddenReason getReason() { public @NotNull CosmeticUser.HiddenReason getReason() {
return reason; return reason;

View File

@@ -21,7 +21,7 @@ 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 cosmetic which is being equipped in this event
*/ */
public @NotNull Cosmetic getCosmetic() { public @NotNull Cosmetic getCosmetic() {
return cosmetic; return cosmetic;
@@ -30,7 +30,7 @@ public class PlayerCosmeticPostEquipEvent extends PlayerCosmeticEvent {
/** /**
* 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 cosmetic that the player will equip
*/ */
public void setCosmetic(@NotNull Cosmetic cosmetic) { public void setCosmetic(@NotNull Cosmetic cosmetic) {
this.cosmetic = cosmetic; this.cosmetic = cosmetic;

View File

@@ -7,22 +7,24 @@ import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Called when a player removes a cosmetic * Called when a player removes a {@link Cosmetic}.
*/ */
public class PlayerCosmeticRemoveEvent extends PlayerCosmeticEvent implements Cancellable { public class PlayerCosmeticRemoveEvent extends PlayerCosmeticEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancel = false;
private final Cosmetic cosmetic; private final Cosmetic cosmetic;
private boolean cancel = false;
public PlayerCosmeticRemoveEvent(@NotNull CosmeticUser who, @NotNull Cosmetic cosmetic) { public PlayerCosmeticRemoveEvent(@NotNull CosmeticUser who, @NotNull Cosmetic cosmetic) {
super(who); super(who);
this.cosmetic = cosmetic; this.cosmetic = cosmetic;
} }
/** /**
* Gets the {@link Cosmetic} being removed in this event * Gets the {@link Cosmetic} being removed in this event.
* *
* @return The {@link Cosmetic} which is being removed in this event * @return the cosmetic which is being removed in this event
*/ */
public Cosmetic getCosmetic() { public Cosmetic getCosmetic() {
return cosmetic; return cosmetic;
@@ -33,27 +35,17 @@ public class PlayerCosmeticRemoveEvent extends PlayerCosmeticEvent implements Ca
return cancel; return cancel;
} }
/**
* Sets the cancellation state of this event
*
* <p>
* Canceling this event will prevent the player from removing the cosmetic
* </p>
*
* @param cancel true if you wish to cancel this event
*/
@Override @Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
} }
@Override @Override
@NotNull public @NotNull HandlerList getHandlers() {
public HandlerList getHandlers() { return HANDLER_LIST;
return handlers;
} }
public static HandlerList getHandlerList() { public static @NotNull HandlerList getHandlerList() {
return handlers; return HANDLER_LIST;
} }
} }

View File

@@ -6,10 +6,11 @@ import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Called when cosmetics are shown from a player * Called when cosmetics are shown from a player.
*/ */
public class PlayerCosmeticShowEvent extends PlayerCosmeticEvent implements Cancellable { public class PlayerCosmeticShowEvent extends PlayerCosmeticEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancel = false; private boolean cancel = false;
public PlayerCosmeticShowEvent(@NotNull CosmeticUser who) { public PlayerCosmeticShowEvent(@NotNull CosmeticUser who) {
@@ -21,28 +22,17 @@ public class PlayerCosmeticShowEvent extends PlayerCosmeticEvent implements Canc
return cancel; return cancel;
} }
/**
* Sets the cancellation state of this event
*
* <p>
* Canceling this event will prevent the player from showing cosmetics
* </p>
*
* @param cancel true if you wish to cancel this event
*/
@Override @Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
} }
@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;
} }
} }

View File

@@ -6,23 +6,27 @@ import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Called when a player starts playing an emote * Called when a player starts playing an emote.
*/ */
public class PlayerEmoteStartEvent extends PlayerCosmeticEvent implements Cancellable { public class PlayerEmoteStartEvent extends PlayerCosmeticEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancel = false;
private final String animationId; private final String animationId;
private boolean cancel = false;
public PlayerEmoteStartEvent(@NotNull CosmeticUser who, @NotNull String animationId) { public PlayerEmoteStartEvent(@NotNull CosmeticUser who, @NotNull String animationId) {
super(who); super(who);
this.animationId = animationId; this.animationId = animationId;
} }
/** /**
* Gets the animation id of the emote the player started playing * Gets the animation id of the emote the player started playing.
* @implNote The returned string of this method may be an invalid animation id. Make sure to validate it before use
* *
* @return The animation id of the emote which the player started playing * @implNote The returned string of this method may be an invalid animation id.
* Make sure to validate it before use by calling {@link com.hibiscusmc.hmccosmetics.emotes.EmoteManager#get(String)}.
*
* @return the animation id of the emote which the player started playing
*/ */
@NotNull @NotNull
public String getAnimationId() { public String getAnimationId() {
@@ -34,28 +38,17 @@ public class PlayerEmoteStartEvent extends PlayerCosmeticEvent implements Cancel
return cancel; return cancel;
} }
/**
* Sets the cancellation state of this event
*
* <p>
* Canceling this event will prevent the player from playing the emote
* </p>
*
* @param cancel true if you wish to cancel this event
*/
@Override @Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
} }
@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;
} }
} }

View File

@@ -7,13 +7,15 @@ import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Called when a player stops playing an emote * Called when a player stops playing an emote.
*/ */
public class PlayerEmoteStopEvent extends PlayerCosmeticEvent implements Cancellable { public class PlayerEmoteStopEvent extends PlayerCosmeticEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancel = false;
private final UserEmoteManager.StopEmoteReason reason; private final UserEmoteManager.StopEmoteReason reason;
private boolean cancel = false;
public PlayerEmoteStopEvent(@NotNull CosmeticUser who, @NotNull UserEmoteManager.StopEmoteReason reason) { public PlayerEmoteStopEvent(@NotNull CosmeticUser who, @NotNull UserEmoteManager.StopEmoteReason reason) {
super(who); super(who);
this.reason = reason; this.reason = reason;
@@ -25,20 +27,19 @@ public class PlayerEmoteStopEvent extends PlayerCosmeticEvent implements Cancell
* @return The {@link UserEmoteManager.StopEmoteReason} why the emote has stopped playing * @return The {@link UserEmoteManager.StopEmoteReason} why the emote has stopped playing
* @deprecated As of release 2.2.5+, replaced by {@link #getReason()} * @deprecated As of release 2.2.5+, replaced by {@link #getReason()}
*/ */
@Deprecated @Deprecated(forRemoval = true)
@NotNull @NotNull
public UserEmoteManager.StopEmoteReason getStopEmoteReason() { public UserEmoteManager.StopEmoteReason getStopEmoteReason() {
return reason; return reason;
} }
/** /**
* Gets the {@link UserEmoteManager.StopEmoteReason} as to why the emote has stopped playing * Gets the {@link UserEmoteManager.StopEmoteReason} as to why the emote has stopped playing.
* *
* @return The {@link UserEmoteManager.StopEmoteReason} why the emote has stopped playing * @return the reason why the emote has stopped playing
* @since 2.2.5 * @since 2.2.5
*/ */
@NotNull public @NotNull UserEmoteManager.StopEmoteReason getReason() {
public UserEmoteManager.StopEmoteReason getReason() {
return reason; return reason;
} }
@@ -47,28 +48,17 @@ public class PlayerEmoteStopEvent extends PlayerCosmeticEvent implements Cancell
return cancel; return cancel;
} }
/**
* Sets the cancellation state of this event
*
* <p>
* Canceling this event will prevent the player from stopping the emote
* </p>
*
* @param cancel true if you wish to cancel this event
*/
@Override @Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
} }
@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;
} }
} }

View File

@@ -4,22 +4,22 @@ 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's cosmetic data is loaded.
*/
public class PlayerLoadEvent extends PlayerCosmeticEvent { public class PlayerLoadEvent extends PlayerCosmeticEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private static final HandlerList handlers = new HandlerList();
public PlayerLoadEvent(@NotNull CosmeticUser who) { public PlayerLoadEvent(@NotNull CosmeticUser who) {
super(who); super(who);
} }
@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;
} }
} }

View File

@@ -6,23 +6,21 @@ import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Called when a menu is closed by a player * Called when a {@link Menu} is closed by a player.
*/ */
public class PlayerMenuCloseEvent extends PlayerMenuEvent { public class PlayerMenuCloseEvent extends PlayerMenuEvent {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
public PlayerMenuCloseEvent(@NotNull CosmeticUser who, @NotNull Menu menu) { public PlayerMenuCloseEvent(@NotNull CosmeticUser who, @NotNull Menu menu) {
super(who, menu); super(who, menu);
} }
@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;
} }
} }

View File

@@ -5,10 +5,10 @@ import com.hibiscusmc.hmccosmetics.user.CosmeticUser;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Represents a menu related event * Represents an event related to a player's interaction with a {@link Menu}.
*/ */
public abstract class PlayerMenuEvent extends PlayerCosmeticEvent { public abstract class PlayerMenuEvent extends PlayerCosmeticEvent {
protected Menu menu; protected final Menu menu;
public PlayerMenuEvent(@NotNull CosmeticUser who, @NotNull Menu menu) { public PlayerMenuEvent(@NotNull CosmeticUser who, @NotNull Menu menu) {
super(who); super(who);
@@ -16,12 +16,11 @@ public abstract class PlayerMenuEvent extends PlayerCosmeticEvent {
} }
/** /**
* Gets the {@link Menu} involved with this event * Gets the {@link Menu} involved with this event.
* *
* @return The {@link Menu} which is involved with the event * @return the menu involved in this event
*/ */
@NotNull public @NotNull final Menu getMenu() {
public final Menu getMenu() {
return menu; return menu;
} }
} }

View File

@@ -7,10 +7,11 @@ import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Called when a menu is opened by a player * Called when a {@link Menu} is opened by a player.
*/ */
public class PlayerMenuOpenEvent extends PlayerMenuEvent implements Cancellable { public class PlayerMenuOpenEvent extends PlayerMenuEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancel = false; private boolean cancel = false;
public PlayerMenuOpenEvent(@NotNull CosmeticUser who, @NotNull Menu menu) { public PlayerMenuOpenEvent(@NotNull CosmeticUser who, @NotNull Menu menu) {
@@ -22,28 +23,17 @@ public class PlayerMenuOpenEvent extends PlayerMenuEvent implements Cancellable
return cancel; return cancel;
} }
/**
* Sets the cancellation state of this event
*
* <p>
* Canceling this event will prevent the player from opening a {@link Menu}
* </p>
*
* @param cancel true if you wish to cancel this event
*/
@Override @Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
} }
@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;
} }
} }

View File

@@ -1,36 +1,28 @@
package com.hibiscusmc.hmccosmetics.api.events; package com.hibiscusmc.hmccosmetics.api.events;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.UUID; import java.util.UUID;
/** /**
* Called before a player is loaded into the plugin (including before the plugin gets their data). * Called before a player's data is loaded into the plugin.
* This event is cancellable, and if cancelled, the player will not be loaded into the plugin. *
* <p>
* If this event is cancelled, the player's data will not be loaded,
* and the player will not be able to interact with the plugin.
* </p>
*/ */
public class PlayerPreLoadEvent extends PlayerEvent implements Cancellable { public class PlayerPreLoadEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private static final HandlerList handlers = new HandlerList();
private boolean cancelled = false; private boolean cancelled = false;
public PlayerPreLoadEvent(@NotNull UUID id) { public PlayerPreLoadEvent(@NotNull UUID id) {
super(id); super(id);
} }
@Override
@NotNull
public HandlerList getHandlers() {
return handlers;
}
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
@Override @Override
public boolean isCancelled() { public boolean isCancelled() {
return cancelled; return cancelled;
@@ -40,4 +32,13 @@ public class PlayerPreLoadEvent extends PlayerEvent implements Cancellable {
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancelled = cancel; this.cancelled = cancel;
} }
@Override
public @NotNull HandlerList getHandlers() {
return HANDLER_LIST;
}
public static @NotNull HandlerList getHandlerList() {
return HANDLER_LIST;
}
} }

View File

@@ -4,23 +4,22 @@ 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 players data is unloaded from the plugin. This is called when a player leaves the server.
*/
public class PlayerUnloadEvent extends PlayerCosmeticEvent { public class PlayerUnloadEvent extends PlayerCosmeticEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private static final HandlerList handlers = new HandlerList();
public PlayerUnloadEvent(@NotNull CosmeticUser who) { public PlayerUnloadEvent(@NotNull CosmeticUser who) {
super(who); super(who);
} }
@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;
} }
} }

View File

@@ -2,19 +2,18 @@ package com.hibiscusmc.hmccosmetics.api.events;
import com.hibiscusmc.hmccosmetics.config.Wardrobe; import com.hibiscusmc.hmccosmetics.config.Wardrobe;
import com.hibiscusmc.hmccosmetics.user.CosmeticUser; import com.hibiscusmc.hmccosmetics.user.CosmeticUser;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Called when a player enters their wardrobe * Called when a player enters their {@link Wardrobe}.
*/ */
public class PlayerWardrobeEnterEvent extends PlayerCosmeticEvent implements Cancellable { public class PlayerWardrobeEnterEvent extends PlayerCosmeticEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancel = false; private boolean cancel = false;
@Getter @Setter
private Wardrobe wardrobe; private Wardrobe wardrobe;
public PlayerWardrobeEnterEvent(@NotNull CosmeticUser who, @NotNull Wardrobe wardrobe) { public PlayerWardrobeEnterEvent(@NotNull CosmeticUser who, @NotNull Wardrobe wardrobe) {
@@ -22,33 +21,38 @@ public class PlayerWardrobeEnterEvent extends PlayerCosmeticEvent implements Can
this.wardrobe = wardrobe; this.wardrobe = wardrobe;
} }
/**
* Get the {@link Wardrobe} the player is entering.
* @return The wardrobe being entered
*/
public Wardrobe getWardrobe() {
return wardrobe;
}
/**
* Set the {@link Wardrobe} the player is entering.
* @param wardrobe the wardrobe being entered
*/
public void setWardrobe(Wardrobe wardrobe) {
this.wardrobe = wardrobe;
}
@Override @Override
public boolean isCancelled() { public boolean isCancelled() {
return cancel; return cancel;
} }
/**
* Sets the cancellation state of this event
*
* <p>
* Canceling this event will prevent the player from entering their wardrobe
* </p>
*
* @param cancel true if you wish to cancel this event
*/
@Override @Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
} }
@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;
} }
} }

View File

@@ -6,10 +6,11 @@ import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
* Called when a player leaves their wardrobe * Called when a player leaves their {@link com.hibiscusmc.hmccosmetics.config.Wardrobe}.
*/ */
public class PlayerWardrobeLeaveEvent extends PlayerCosmeticEvent implements Cancellable { public class PlayerWardrobeLeaveEvent extends PlayerCosmeticEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancel = false; private boolean cancel = false;
public PlayerWardrobeLeaveEvent(@NotNull CosmeticUser who) { public PlayerWardrobeLeaveEvent(@NotNull CosmeticUser who) {
@@ -21,28 +22,17 @@ public class PlayerWardrobeLeaveEvent extends PlayerCosmeticEvent implements Can
return cancel; return cancel;
} }
/**
* Sets the cancellation state of this event
*
* <p>
* Canceling this event will prevent the player from leaving their wardrobe
* </p>
*
* @param cancel true if you wish to cancel this event
*/
@Override @Override
public void setCancelled(boolean cancel) { public void setCancelled(boolean cancel) {
this.cancel = cancel; this.cancel = cancel;
} }
@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;
} }
} }