public class WauzCitizenInteractions
extends java.lang.Object
WauzCitizen
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
displayName
The name of the citizen, as shown in chat.
|
private java.util.Map<org.bukkit.inventory.ItemStack,WauzPlayerEvent> |
interactionEventMap
A map of interaction events, indexed by the triggering item stacks.
|
private java.util.List<org.bukkit.inventory.ItemStack> |
interactionItemStacks
The list of item stacks, representing the interactions.
|
private java.lang.String |
modeSelection
The mode that should be selected from the hub on interaction.
|
Constructor and Description |
---|
WauzCitizenInteractions(java.lang.String citizenName,
java.lang.String displayName)
Constructs a set of interactions for the citizen with the given name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkForValidInteractions(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack clickedItemStack)
Triggers the corresponding event, if the player clicked an interaction item stack.
|
private void |
createInteractionItemStack(java.lang.String citizenName,
java.lang.String interactionKey)
Creates an interaction item stack from the given values.
|
org.bukkit.inventory.Inventory |
createInteractionMenuBase(CitizenInteractionMenu interactionMenu,
java.lang.String menuTitle)
Creates an inventory menu, containing all interaction item stacks.
|
java.lang.String |
getModeSelection() |
private java.lang.String displayName
private java.lang.String modeSelection
private java.util.List<org.bukkit.inventory.ItemStack> interactionItemStacks
private java.util.Map<org.bukkit.inventory.ItemStack,WauzPlayerEvent> interactionEventMap
public WauzCitizenInteractions(java.lang.String citizenName, java.lang.String displayName)
citizenName
- The canonical name of the citizen.displayName
- The display name of the citizen.CitizenConfigurator.getModeSelection(String)
,
createInteractionItemStack(String, String)
public boolean checkForValidInteractions(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack clickedItemStack)
player
- The player who chose the interaction.clickedItemStack
- The chosen interaction item stack.public org.bukkit.inventory.Inventory createInteractionMenuBase(CitizenInteractionMenu interactionMenu, java.lang.String menuTitle)
interactionMenu
- The menu to create the base for.menuTitle
- The title of the menu.private void createInteractionItemStack(java.lang.String citizenName, java.lang.String interactionKey)
citizenName
- The name of the citizen.interactionKey
- The key of the citizen interaction.public java.lang.String getModeSelection()