Skip to content

NPCMessageCommand

Package: com.hypixel.hytale.server.npc.commands

public class NPCMessageCommand extends AbstractPlayerCommand

Implements /npc message. Sends a beacon message to one or all NPCs. Beacon messages are processed by the NPC’s BeaconSupport component and can trigger beacon-type sensors in the behavior tree.

ArgumentTypeRequiredDefaultDescription
messageStringyesThe message string to send
expirationDoubleno1.0Message expiration time in seconds
--allflagnoSend to all NPCs with BeaconSupport
entityentity IDnoTarget NPC (defaults to player’s look-target)
  • --all mode: Iterates all entities with NPCEntity in parallel, posting the message to each entity’s BeaconSupport component (if present) with the player as the sender.
  • Single target mode: Uses NPCCommandUtils to resolve the target NPC and posts the message to its BeaconSupport.
public NPCMessageCommand()

Registers as sub-command "message" with translation key "server.commands.npc.message.desc".

Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.