public class NPCChatEvent
extends net.minecraftforge.eventbus.api.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 |
---|---|
NPCEntity |
npc
The NPCChatting instance belonging to the NPC in question
|
net.minecraft.entity.player.PlayerEntity |
player
The player interacting with the NPC
|
Constructor and Description |
---|
NPCChatEvent(NPCEntity npc,
net.minecraft.entity.player.PlayerEntity 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 NPCEntity npc
public final net.minecraft.entity.player.PlayerEntity player
public NPCChatEvent(NPCEntity npc, net.minecraft.entity.player.PlayerEntity 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.