Skip to content

NPCRunTestsCommand

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

public class NPCRunTestsCommand extends AbstractPlayerCommand

Implements /npc runtests. Runs a sequential NPC behavior test suite. Spawns one NPC role at a time at the player’s position and waits for the tester to mark each as pass, fail, or abort. Tracks test results per role and reports a summary when all roles have been tested or the test is aborted.

Supports specifying roles via a comma-separated list or using a preset set from NPCPlugin.getPresetCoverageTestNPCs(). Role names can include a flock size suffix (e.g., "Zombie#5" to spawn a flock of 5).

ArgumentTypeRequiredDescription
rolesStringconditionalComma-separated list of role names (with optional #flockSize suffix)
--presetflagnoUse the preset coverage test NPC list
--passflagnoMark current NPC as passed, advance to next
--failflagnoMark current NPC as failed, advance to next
--abortflagnoAbort the test suite and report results
public NPCRunTestsCommand()

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

ClassDescription
NPCRunTestsCommand.NPCTestDataECS component storing test session state
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.