Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/main/java/net/citizensnpcs/api/event/NPCTraitCommandDetachEvent.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,37 @@ | ||
package net.citizensnpcs.api.event; | ||
|
||
import net.citizensnpcs.api.npc.NPC; | ||
import net.citizensnpcs.api.trait.Trait; | ||
|
||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.event.HandlerList; | ||
|
||
public class NPCTraitCommandDetachEvent extends NPCEvent { | ||
private final CommandSender sender; | ||
private final Class<? extends Trait> traitClass; | ||
|
||
public NPCTraitCommandDetachEvent(NPC npc, Class<? extends Trait> traitClass, CommandSender sender) { | ||
super(npc); | ||
this.traitClass = traitClass; | ||
this.sender = sender; | ||
} | ||
|
||
public CommandSender getCommandSender() { | ||
return sender; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public Class<? extends Trait> getTraitClass() { | ||
return traitClass; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
} |