Blacksmith/src/main/java/net/knarcraft/blacksmith/event/ScrapperSalvageFailEvent.java
EpicKnarvik97 f5bfbfd4f8
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
Attenpts to mitigate an NPC's entity becoming unavailable
2024-09-27 01:37:07 +02:00

45 lines
1.2 KiB
Java

package net.knarcraft.blacksmith.event;
import net.citizensnpcs.api.npc.NPC;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* The event triggered when a scrapper salvaging fails
*/
public class ScrapperSalvageFailEvent extends AbstractBlacksmithPluginEvent implements SalvageEndEvent {
private static final HandlerList handlers = new HandlerList();
/**
* Instantiates a new scrapper salvage fail event
*
* @param npc <p>The NPC involved in the event</p>
* @param entity <p>The entity of the NPC</p>
* @param player <p>The player involved in the event</p>
*/
public ScrapperSalvageFailEvent(@NotNull NPC npc, @NotNull Entity entity, @NotNull Player player) {
super(npc, entity, player);
}
/**
* Gets a handler-list containing all event handlers
*
* @return <p>A handler-list with all event handlers</p>
*/
@SuppressWarnings("unused")
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
@Override
@NotNull
public HandlerList getHandlers() {
return handlers;
}
}