# PlayerSendCommandEvent

PlayerSendCommandEvent is a **cancellabe** event fired when a player attempts to execute a chat command.

This event is fired regardless of whether the command will be successfully executed. For an event actually fired when a command is *executed*, use [PlayerExecuteCommandEvent](/irminsul/api/api-references/game-events/playerexecutecommandevent.md) instead, which is fired later than this event.

## Fields

### cancelled

*boolean, inherited*

Whether this event has been cancelled

### sender

final *`io.irminsul.common.game.player.Player`*

The player sending the command. Guaranteed non-null.

### command

final String

The command provided by the player. Guaranteed non-null.

### args

final String\[]

A list of command arguments provided by the player, which may be empty. Guaranteed non-null.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://irminsul.gitbook.io/irminsul/api/api-references/game-events/playersendcommandevent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
