Adds some events that trigger when NPC actions start or end, and when sounds are played
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
package net.knarcraft.blacksmith.event;
|
||||
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* The base class for all blacksmith plugin events
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public abstract class AbstractBlacksmithPluginEvent extends Event implements BlacksmithPluginEvent {
|
||||
|
||||
protected final NPC npc;
|
||||
protected final Player player;
|
||||
|
||||
/**
|
||||
* Instantiates a new blacksmith plugin event
|
||||
*
|
||||
* @param npc <p>The NPC involved in the event</p>
|
||||
* @param player <p>The player involved in the event</p>
|
||||
*/
|
||||
public AbstractBlacksmithPluginEvent(@NotNull NPC npc, @NotNull Player player) {
|
||||
this.npc = npc;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public NPC getNpc() {
|
||||
return this.npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user