Contents
Class AbstractTargetEntityCommand
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.AbstractTargetEntityCommand
- Direct Known Subclasses:
EntityEffectCommand, EntityHideFromAdventurePlayersCommand, EntityIntangibleCommand, EntityInvulnerableCommand, EntityMakeInteractableCommand, EntityStatsAddCommand, EntityStatsDumpCommand, EntityStatsGetCommand, EntityStatsResetCommand, EntityStatsSetCommand, EntityStatsSetToMaxCommand
A command base that runs directly on the thread of the target world. Allows for optional entity, player, and radius arguments.
The command will target entities based on the following priority:
- If a radius argument is provided, it will target all living entities within that radius from the sender's position (sender must be a player)
- If a player argument is provided, it will target that player's entity
- If an entity argument is provided, it will target that entity
- If the sender is a player, it will target the 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 target
entities' Store, Ref list, 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
ConstructorsConstructorDescriptionAbstractTargetEntityCommand(String description) This constructor is specifically only for variant commands, added withAbstractCommand.addUsageVariant(AbstractCommand)AbstractTargetEntityCommand(String name, String description) Default Constructor for aAbstractTargetEntityCommandinstance.AbstractTargetEntityCommand(String name, String description, boolean requiresConfirmation) Constructor for aAbstractTargetEntityCommandinstance. -
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
-
AbstractTargetEntityCommand
Default Constructor for aAbstractTargetEntityCommandinstance.- Parameters:
name- The name of the command.description- The description of the command.
-
AbstractTargetEntityCommand
public AbstractTargetEntityCommand(@Nonnull String name, @Nonnull String description, boolean requiresConfirmation) Constructor for aAbstractTargetEntityCommandinstance.- Parameters:
name- The name of the command.description- The description of the command.requiresConfirmation- Whether the command requires additional confirmation.
-
AbstractTargetEntityCommand
This constructor is specifically only for variant commands, added withAbstractCommand.addUsageVariant(AbstractCommand)- Parameters:
description- The description of the command.
-