public class NPCChatEvent
extends net.minecraftforge.fml.common.eventhandler.Event
NPCChatting
. Chat lines may be changed by sending a replacement ArrayList of Strings
Canceling this event will prevent any interaction with the NPC.Modifier and Type | Field and Description |
---|---|
EntityNPC |
npc
The NPCChatting instance belonging to the NPC in question
|
net.minecraft.entity.player.EntityPlayer |
player
The player interacting with the NPC
|
Constructor and Description |
---|
NPCChatEvent(EntityNPC npc,
net.minecraft.entity.player.EntityPlayer player,
java.util.ArrayList<java.lang.String> chatlines) |
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<java.lang.String> |
getChat() |
void |
setChat(java.util.ArrayList<java.lang.String> chatlines)
Sets the new chat lines for the NPC
|
public final EntityNPC npc
public final net.minecraft.entity.player.EntityPlayer player
public NPCChatEvent(EntityNPC npc, net.minecraft.entity.player.EntityPlayer player, java.util.ArrayList<java.lang.String> chatlines)
public java.util.ArrayList<java.lang.String> getChat()
public void setChat(java.util.ArrayList<java.lang.String> chatlines)
chatlines
- The ArrayList containing the new chat lines in order. If empty, the old chat lines will be used.