public class WauzPlayerEventCitizenTalk extends java.lang.Object implements WauzPlayerEvent
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
displayName
The name of the citizen, as shown in chat.
|
private java.util.List<java.lang.String> |
messages
The lines the citizen should speak.
|
core
Constructor and Description |
---|
WauzPlayerEventCitizenTalk(java.lang.String displayName,
java.util.List<java.lang.String> messages)
Creates an event to talk to the given citizen.
|
Modifier and Type | Method and Description |
---|---|
boolean |
execute(org.bukkit.entity.Player player)
Executes the event for the given player.
|
private void |
printDialog(org.bukkit.entity.Player player,
java.util.List<java.lang.String> messages,
int line)
Prints recursively all messages in chat.
|
private java.lang.String displayName
private java.util.List<java.lang.String> messages
public WauzPlayerEventCitizenTalk(java.lang.String displayName, java.util.List<java.lang.String> messages)
displayName
- How to display the sender of the messages.messages
- The lines the citizen should speak.public boolean execute(org.bukkit.entity.Player player)
execute
in interface WauzPlayerEvent
player
- The player for the execution.printDialog(Player, List, int)
private void printDialog(org.bukkit.entity.Player player, java.util.List<java.lang.String> messages, int line)
player
- The player who should receive the messages.messages
- The list of all message lines.line
- The index of the current message line.