Contents
Class NPCWorldCommandBase
java.lang.Object
com.hypixel.hytale.server.core.command.system.AbstractCommand
com.hypixel.hytale.server.core.command.system.basecommands.AbstractAsyncCommand
com.hypixel.hytale.server.core.command.system.basecommands.AbstractWorldCommand
com.hypixel.hytale.server.npc.commands.NPCWorldCommandBase
- Direct Known Subclasses:
NPCAppearanceCommand, NPCAttackCommand.ClearAttackCommand, NPCAttackCommand.SetAttackCommand, NPCDumpCommand, NPCGiveCommand, NPCGiveCommand.GiveNothingCommand, NPCMultiSelectCommandBase, NPCPathCommand.PolygonPathCommand, NPCPathCommand.SetPathCommand, NPCRoleCommand, NPCRoleCommand.GetRoleCommand
A command base that runs directly on the thread of the target world and provides access to an NPC entity.
The command will target an NPC entity based on the following priority:
- If an entity argument is provided, it will target that entity (must be an NPC)
- If the sender is a player, it will target the NPC entity in view (ray-cast)
- Otherwise, an error message is sent
This command base ensures thread safety by executing on the world thread, and provides access to the
NPC entity's NPCEntity, Store, Ref, and World.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractCommand
AbstractCommand.SuggestionOverrideEntry -
Field Summary
Fields inherited from class AbstractCommand
EMPTY_STRING_ARRAY, LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionNPCWorldCommandBase(String description) This constructor is specifically only for variant commands, added withAbstractCommand.addUsageVariant(AbstractCommand).NPCWorldCommandBase(String name, String description) Default Constructor for anNPCWorldCommandBaseinstance.NPCWorldCommandBase(String name, String description, boolean requiresConfirmation) Constructor for anNPCWorldCommandBaseinstance. -
Method Summary
Methods inherited from class AbstractAsyncCommand
runAsyncMethods inherited from class AbstractCommand
acceptCall, addAliases, addSubCommand, addUsageVariant, completeRegistration, countParents, getAliases, getDescription, getFullyQualifiedName, getName, getOptionalArgument, getOptionalArguments, getOwner, getPermission, getPermissionGroups, getPermissionGroupsRecursive, getRequiredArguments, getSubCommand, getSubCommands, getSuggestionOverrides, getUsageShort, getUsageString, getVariantByArgCount, getVariantCommands, hasBeenRegistered, hasPermission, isVariant, matches, putRecursivePermissionGroups, requireNoPermission, requirePermission, requirePermission, setAllowsExtraArguments, setOwner, withDefaultArg, withDefaultArg, withFlagArg, withListDefaultArg, withListOptionalArg, withListRequiredArg, withOptionalArg, withOptionalArg, withRequiredArg, withRequiredArg
-
Constructor Details
-
NPCWorldCommandBase
Default Constructor for anNPCWorldCommandBaseinstance.- Parameters:
name- The name of the command.description- The description of the command.
-
NPCWorldCommandBase
public NPCWorldCommandBase(@Nonnull String name, @Nonnull String description, boolean requiresConfirmation) Constructor for anNPCWorldCommandBaseinstance.- Parameters:
name- The name of the command.description- The description of the command.requiresConfirmation- Whether the command requires additional confirmation.
-
NPCWorldCommandBase
This constructor is specifically only for variant commands, added withAbstractCommand.addUsageVariant(AbstractCommand).- Parameters:
description- The description of the command.
-