9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2025-12-23 00:49:31 +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;
public class EffectActivateEvent extends PlayerEvent implements Cancellable {
/**
* The reforge.
*/
private final Reforge reforge;
/**
* The effect that activated.
*/
private final Effect effect;
/**
* If the event is cancelled.
*/
private boolean cancelled;
/**
* Bukkit parity.
*/
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);
this.reforge = reforge;
this.effect = effect;
this.cancelled = false;
}
/**
* Get if the effect activation is cancelled.
*
* @return If cancelled.
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Set if the event is cancelled.
*
* @param cancel If cancelled.
*/
@Override
public void setCancelled(boolean cancel) {
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
/**
* Bukkit parity.
*
* @return The handlers.
*/
@Override
public @NotNull HandlerList getHandlers() {
return HANDLERS;
}
/**
* Get the reforge associated with the event.
*
* @return The reforge.
*/
@NotNull
public Reforge getReforge() {
return this.reforge;
}
/**
* Get the effect associated with the event.
*
* @return The effect.
*/
@NotNull
public Effect getEffect() {
return this.effect;
}
/**
* Bukkit parity.
*
* @return The handler list.
*/
public static HandlerList getHandlerList() {
return HANDLERS;
}
}