Skip to content

Commit

Permalink
document sender types
Browse files Browse the repository at this point in the history
  • Loading branch information
Citymonstret committed Dec 3, 2023
1 parent d0408b2 commit 411db0a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docs/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,19 @@ Though, cloud has support for some more complex permission types, such as:

#### Sender types

Most classes in Cloud take in a generic parameter type `<C>`, which is used for the "command sender type."
The command sender is the entity executing the command, and this represents different things depending
on the platform.

You may use a sender type that is not native to the platform, and the platform command managers take in a function
that maps between your custom type and the native command sender type.

When you create a command you may override the sender type for that specific command, as long as the new
sender type has `<C>` as its supertype.
This is done by using the `Command.Builder.senderType(Class)` method.
Cloud will make sure that the sender is of the right type when executing the command, and will fail exceptionally
if it isn't.

#### Components

#### Literals
Expand Down Expand Up @@ -327,10 +340,6 @@ the enum values as suggestions.

The enum parser can be created using the static factory methods found in [EnumParser](TODO).

#### Duration

Durations can be parsed.

#### UUID

The UUID parser parses dash-separated UUIDs.
Expand Down

0 comments on commit 411db0a

Please sign in to comment.