Remove the API component - closes #51

This commit is contained in:
Focusvity
2022-08-02 22:08:52 +10:00
parent f806470fd5
commit d6b44863aa
63 changed files with 191 additions and 492 deletions

View File

@ -0,0 +1,38 @@
package dev.plex.event;
import dev.plex.player.PlexPlayer;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.Bukkit;
import org.bukkit.event.Cancellable;
import org.bukkit.event.player.PlayerEvent;
/**
* Superclass for punishment events
*/
@Getter
public abstract class PunishedPlayerEvent extends PlayerEvent implements Cancellable
{
/**
* The player who was punished
*/
protected PlexPlayer punishedPlayer;
/**
* Whether the event was cancelled
*/
@Setter
protected boolean cancelled; //TODO: unsure if cancelling the event does anything
/**
* Creates an event object
*
* @param punishedPlayer The player who was punished
* @see PlexPlayer
*/
protected PunishedPlayerEvent(PlexPlayer punishedPlayer)
{
super(Bukkit.getPlayer(punishedPlayer.getUuid()));
this.punishedPlayer = punishedPlayer;
}
}