-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
2 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/main/java/net/citizensnpcs/api/event/NPCRenameEvent.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,39 @@ | ||
package net.citizensnpcs.api.event; | ||
|
||
import org.bukkit.event.HandlerList; | ||
|
||
import net.citizensnpcs.api.npc.NPC; | ||
|
||
public class NPCRenameEvent extends NPCEvent { | ||
private String newName; | ||
private final String oldName; | ||
|
||
public NPCRenameEvent(NPC npc, String oldName, String newName) { | ||
super(npc); | ||
this.oldName = oldName; | ||
this.setNewName(newName); | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public String getNewName() { | ||
return newName; | ||
} | ||
|
||
public String getOldName() { | ||
return oldName; | ||
} | ||
|
||
public void setNewName(String newName) { | ||
this.newName = newName; | ||
} | ||
|
||
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