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
5 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
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
40 changes: 40 additions & 0 deletions
40
src/main/java/net/citizensnpcs/api/event/NPCLookCloseChangeTargetEvent.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,40 @@ | ||
package net.citizensnpcs.api.event; | ||
|
||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.HandlerList; | ||
|
||
import net.citizensnpcs.api.npc.NPC; | ||
|
||
public class NPCLookCloseChangeTargetEvent extends NPCEvent { | ||
private Player next; | ||
private final Player old; | ||
|
||
public NPCLookCloseChangeTargetEvent(NPC npc, Player old, Player next) { | ||
super(npc); | ||
this.old = old; | ||
this.next = next; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public Player getNewTarget() { | ||
return next; | ||
} | ||
|
||
public Player getPreviousTarget() { | ||
return old; | ||
} | ||
|
||
public void setNewTarget(Player target) { | ||
this.next = target; | ||
} | ||
|
||
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
7 changes: 7 additions & 0 deletions
7
src/main/java/net/citizensnpcs/api/gui/InventoryMenuPage.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 |
---|---|---|
@@ -1,5 +1,12 @@ | ||
package net.citizensnpcs.api.gui; | ||
|
||
import org.bukkit.entity.HumanEntity; | ||
import org.bukkit.event.inventory.InventoryClickEvent; | ||
|
||
public abstract class InventoryMenuPage { | ||
public abstract void create(MenuContext ctx); | ||
|
||
public abstract void onClick(InventoryMenuSlot slot, InventoryClickEvent event); | ||
|
||
public abstract void onClose(HumanEntity player); | ||
} |
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