Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new NPCRemoveByCommandSenderEvent
- Loading branch information
Showing
4 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/main/java/net/citizensnpcs/api/event/NPCRemoveByCommandSenderEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.citizensnpcs.api.event; | ||
|
||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.event.HandlerList; | ||
|
||
import net.citizensnpcs.api.npc.NPC; | ||
|
||
public class NPCRemoveByCommandSenderEvent extends NPCRemoveEvent { | ||
private final CommandSender source; | ||
|
||
public NPCRemoveByCommandSenderEvent(NPC npc, CommandSender source) { | ||
super(npc); | ||
this.source = source; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public CommandSender getSource() { | ||
return source; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters