Refactor Events

This commit is contained in:
Len
2025-11-12 23:17:44 +01:00
parent c32bd21f0f
commit 798946b386
9 changed files with 73 additions and 7 deletions
@@ -0,0 +1,40 @@
package com.alttd.essentia.api.events.player;
import com.alttd.essentia.api.events.EssentiaEvent;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
public class PlayerRandomTeleportEvent extends EssentiaEvent {
private static final HandlerList handlerList = new HandlerList();
private final Player player;
private final Location location;
public PlayerRandomTeleportEvent(Player player, Location location) {
this.player = player;
this.location = location;
}
public Player getPlayer() {
return player;
}
public Location getLocation() {
return location;
}
@NotNull
@Override
public HandlerList getHandlers() {
return handlerList;
}
@NotNull
public static HandlerList getHandlerList() {
return handlerList;
}
}