9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2025-12-23 08:59:24 +00:00

Added EffectActivateEvent javadoc

This commit is contained in:
Auxilor
2021-10-31 10:55:00 +00:00
parent fcbdd7d0c0
commit 6c7059c49d

View File

@@ -9,49 +9,98 @@ import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
public class EffectActivateEvent extends PlayerEvent implements Cancellable { public class EffectActivateEvent extends PlayerEvent implements Cancellable {
/**
* The reforge.
*/
private final Reforge reforge; private final Reforge reforge;
/**
* The effect that activated.
*/
private final Effect effect; private final Effect effect;
/**
* If the event is cancelled.
*/
private boolean cancelled; private boolean cancelled;
/**
* Bukkit parity.
*/
private static final HandlerList HANDLERS = new HandlerList(); private static final HandlerList HANDLERS = new HandlerList();
public EffectActivateEvent(@NotNull Player who, @NotNull Reforge reforge, @NotNull Effect effect) { /**
* Create new EffectActivateEvent.
*
* @param who The player.
* @param reforge The reforge.
* @param effect The effect.
*/
public EffectActivateEvent(@NotNull final Player who,
@NotNull final Reforge reforge,
@NotNull final Effect effect) {
super(who); super(who);
this.reforge = reforge; this.reforge = reforge;
this.effect = effect; this.effect = effect;
this.cancelled = false; this.cancelled = false;
} }
/**
* Get if the effect activation is cancelled.
*
* @return If cancelled.
*/
@Override @Override
public boolean isCancelled() { public boolean isCancelled() {
return this.cancelled; return this.cancelled;
} }
/**
* Set if the event is cancelled.
*
* @param cancel If cancelled.
*/
@Override @Override
public void setCancelled(boolean cancel) { public void setCancelled(final boolean cancel) {
this.cancelled = cancel; this.cancelled = cancel;
} }
/**
* Bukkit parity.
*
* @return The handlers.
*/
@Override @Override
public @NotNull HandlerList getHandlers() { public @NotNull HandlerList getHandlers() {
return HANDLERS; return HANDLERS;
} }
/**
* Get the reforge associated with the event.
*
* @return The reforge.
*/
@NotNull @NotNull
public Reforge getReforge() { public Reforge getReforge() {
return this.reforge; return this.reforge;
} }
/**
* Get the effect associated with the event.
*
* @return The effect.
*/
@NotNull @NotNull
public Effect getEffect() { public Effect getEffect() {
return this.effect; return this.effect;
} }
/**
* Bukkit parity.
*
* @return The handler list.
*/
public static HandlerList getHandlerList() { public static HandlerList getHandlerList() {
return HANDLERS; return HANDLERS;
} }
} }