Skip to content

DetachedCommand

Namespace Mc.Scripting.Commands · Kind class (sealed)

public sealed class DetachedCommand

What a command needed, copied out of a CommandContext so that it can be used after the executor returned (CommandContext.Detach).

Member Description
string Input { get; } The whole command line without the leading slash.
string Name { get; } The command word.
int PermissionLevel { get; } The vanilla permission level of the source when the command ran.
Player? Player { get; } The executing player, null for the console.
Vec3d Position { get; } The position the command ran at.
Entity Sender { get; } The executing entity (Entity.Null for the console).
public string Input { get; }

The whole command line without the leading slash.

public string Name { get; }

The command word.

public int PermissionLevel { get; }

The vanilla permission level of the source when the command ran.

public Player? Player { get; }

The executing player, null for the console.

public Vec3d Position { get; }

The position the command ran at.

public Entity Sender { get; }

The executing entity (Entity.Null for the console).

Member Description
void Reply(string message) Sends a plain message to whoever ran the command (nothing happens when the player left; call on the tick thread).
void Reply(Component message) Sends a rich message to whoever ran the command.
public void Reply(string message)

Sends a plain message to whoever ran the command (nothing happens when the player left; call on the tick thread).

Parameters

Name Type Description
message string The text.
public void Reply(Component message)

Sends a rich message to whoever ran the command.

Parameters

Name Type Description
message Component The component.

Component · Entity · Player · Vec3d