Class NPCChatEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.NPCChatEvent
public class NPCChatEvent
extends net.minecraftforge.eventbus.api.Event
Event fired when a player begins a chat with an
NPCChatting
. Chat lines may be changed by sending a replacement ArrayList of Strings
Canceling this event will prevent any interaction with the NPC.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNPCChatEvent
(NPCEntity npc, net.minecraft.world.entity.player.Player player, ArrayList<String> chatlines) -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
npc
The NPCChatting instance belonging to the NPC in question -
player
public final net.minecraft.world.entity.player.Player playerThe player interacting with the NPC
-
-
Constructor Details
-
NPCChatEvent
-
-
Method Details
-
getChat
- Returns:
- The ArrayList containing their chat lines in order. Change using setChat(...)
-
setChat
Sets the new chat lines for the NPC- Parameters:
chatlines
- The ArrayList containing the new chat lines in order. If empty, the old chat lines will be used.
-