Contents
Class AbstractTargetPlayerCommand
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.AbstractTargetPlayerCommand
- Direct Known Subclasses:
ChunkMaxSendRateCommand, ChunkResendCommand, ChunkShapeCommand, ChunkTrackerCommand, HitboxCollisionAddCommand.HitboxCollisionAddSelfCommand, HudManagerTestCommand, MapMarkersHideCommand, MapMarkersListCommand, MapMarkersRevealCommand, MountCheckCommand, PacketStatsCommand, ParticleSpawnCommand, PingCommand, PlayerCameraDemoActivateCommand, PlayerCameraDemoDeactivateCommand, PlayerCameraResetCommand, PlayerCameraSideScrollerCommand, PlayerCameraTopdownCommand, PlayerLivesClearCommand, PlayerLivesGetCommand, PlayerLivesSetCommand, PlayerResetCommand, PlayerStatsAddCommand, PlayerStatsDumpCommand, PlayerStatsGetCommand, PlayerStatsResetCommand, PlayerStatsSetCommand, PlayerStatsSetToMaxCommand, PlayerViewRadiusGetCommand, PlayerViewRadiusSetCommand, PlayerZoneCommand, ReferCommand, RepulsionAddCommand.RepulsionAddSelfCommand, RepulsionRemoveCommand.RepulsionRemoveSelfCommand, ReputationAddCommand, ReputationRankCommand, ReputationSetCommand, ReputationValueCommand, SoundPlay2DCommand, SoundPlay3DCommand, TeleportWorldCommand, WildernessDebugCommand, WorldMapViewRadiusGetCommand, WorldMapViewRadiusRemoveCommand, WorldMapViewRadiusSetCommand
A command base that runs directly on the thread of the player's world. Allows for an optional target player argument.
If a target player argument is provided, the command will target that player. Otherwise, if the sender is a player, the command will target the sender. If neither condition is met, an error message is sent.
This command base ensures thread safety by executing on the world thread, and provides access to the target
player's PlayerRef, 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
ConstructorsConstructorDescriptionAbstractTargetPlayerCommand(String description) This constructor is specifically only for variant commands, added withAbstractCommand.addUsageVariant(AbstractCommand)AbstractTargetPlayerCommand(String name, String description) Default Constructor for aAbstractTargetPlayerCommandinstance.AbstractTargetPlayerCommand(String name, String description, boolean requiresConfirmation) Constructor for aAbstractTargetPlayerCommandinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidHandles the initialization of various systems that require the command to be in a state where it should not be modified further in the future.Methods inherited from class AbstractAsyncCommand
runAsyncMethods inherited from class AbstractCommand
acceptCall, addAliases, addSubCommand, addUsageVariant, 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
-
AbstractTargetPlayerCommand
Default Constructor for aAbstractTargetPlayerCommandinstance.- Parameters:
name- The name of the command.description- The description of the command.
-
AbstractTargetPlayerCommand
public AbstractTargetPlayerCommand(@Nonnull String name, @Nonnull String description, boolean requiresConfirmation) Constructor for aAbstractTargetPlayerCommandinstance.- Parameters:
name- The name of the command.description- The description of the command.requiresConfirmation- Whether the command requires additional confirmation.
-
AbstractTargetPlayerCommand
This constructor is specifically only for variant commands, added withAbstractCommand.addUsageVariant(AbstractCommand)- Parameters:
description- The description of the command.
-
-
Method Details
-
completeRegistration
Description copied from class:AbstractCommandHandles the initialization of various systems that require the command to be in a state where it should not be modified further in the future.- Overrides:
completeRegistrationin classAbstractCommand- Throws:
GeneralCommandException- if validation of default arguments failed.
-