Adds some events that trigger when NPC actions start or end, and when sounds are played

This commit is contained in:
2024-07-28 17:12:26 +02:00
parent 81dda85405
commit 904adf46f0
20 changed files with 571 additions and 10 deletions

View File

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