DetachedCommand
Namespace Mc.Scripting.Commands · Kind class (sealed)
public sealed class DetachedCommandWhat a command needed, copied out of a CommandContext so that it can be used after the executor returned (CommandContext.Detach).
Properties
Section titled “Properties”| 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.
PermissionLevel
Section titled “PermissionLevel”public int PermissionLevel { get; }The vanilla permission level of the source when the command ran.
Player
Section titled “Player”public Player? Player { get; }The executing player, null for the console.
Position
Section titled “Position”public Vec3d Position { get; }The position the command ran at.
Sender
Section titled “Sender”public Entity Sender { get; }The executing entity (Entity.Null for the console).
Methods
Section titled “Methods”| 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. |