mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-19 15:09:19 +00:00
docs(PlayerCosmeticHideEvent): improve Javadocs
This commit is contained in:
@@ -6,25 +6,26 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when cosmetics are hidden from a player
|
* Called when cosmetics are hidden from a player.
|
||||||
*/
|
*/
|
||||||
public class PlayerCosmeticHideEvent extends PlayerCosmeticEvent implements Cancellable {
|
public class PlayerCosmeticHideEvent 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 CosmeticUser.HiddenReason reason;
|
private final CosmeticUser.HiddenReason reason;
|
||||||
|
|
||||||
|
private boolean cancel = false;
|
||||||
|
|
||||||
public PlayerCosmeticHideEvent(@NotNull CosmeticUser who, @NotNull CosmeticUser.HiddenReason reason) {
|
public PlayerCosmeticHideEvent(@NotNull CosmeticUser who, @NotNull CosmeticUser.HiddenReason reason) {
|
||||||
super(who);
|
super(who);
|
||||||
this.reason = reason;
|
this.reason = reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 {@link CosmeticUser.HiddenReason} why cosmetics are being hidden for the player
|
||||||
*/
|
*/
|
||||||
@NotNull
|
public @NotNull CosmeticUser.HiddenReason getReason() {
|
||||||
public CosmeticUser.HiddenReason getReason() {
|
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,28 +34,17 @@ public class PlayerCosmeticHideEvent extends PlayerCosmeticEvent implements Canc
|
|||||||
return cancel;
|
return cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the cancellation state of this event
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* Canceling this event will prevent the player from hiding 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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user