NPCAllCommand
Package: com.hypixel.hytale.server.npc.commands
public class NPCAllCommand extends AbstractPlayerCommandImplements /npc all. Spawns one instance of every spawnable NPC role in a grid pattern centered on the player’s position. Each spawned NPC receives a Nameplate showing its role name and is immediately frozen via the Frozen component.
Requires confirmation (requiresConfirmation = true).
Arguments
Section titled “Arguments”| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
distance | Double | no | 4.0 | Spacing between NPCs in the grid (must be > 0) |
Behavior
Section titled “Behavior”- Retrieves all spawnable role template names from
NPCPlugin.getRoleTemplateNames(true), sorted case-insensitively. - Arranges NPCs in a square grid with
ceil(sqrt(count))columns, centered on the player. - For each role, computes the spawn Y coordinate using
NPCPhysicsMath.heightOverGround()to place NPCs on the ground surface. - Spawns each NPC via
NPCPlugin.spawnEntity(), adds aNameplatewith the role name, and applies theFrozencomponent. - Logs warnings for roles that fail to spawn.
Constructor
Section titled “Constructor”public NPCAllCommand()Registers as sub-command "all" with translation key "server.commands.npc.all.desc".
Related Types
Section titled “Related Types”- NPCCommand — parent command collection
- NPCSpawnCommand — spawns individual NPC roles with more options
- NPCCleanCommand — removes all NPCs from a world
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.