Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8e2b800
Add documentation for https://github.com/CommandAPI/CommandAPI/pull/517
DerEchtePilz Feb 17, 2025
085078e
Add diff language support
DerEchtePilz Feb 17, 2025
2516a3a
Update mappings preference switch to say "Paper" and "Spigot" instead…
DerEchtePilz Aug 22, 2025
d81cac5
Document the updated config options
DerEchtePilz Aug 22, 2025
7408d7e
Update default configs
DerEchtePilz Aug 22, 2025
759a92c
Rename "mappings" preference to "paper-spigot" and use that on the co…
DerEchtePilz Aug 22, 2025
a3b2790
Finish config page
DerEchtePilz Aug 22, 2025
74134e4
Move documentation code to a new bukkit submodule in preparation for …
DerEchtePilz Sep 11, 2025
4e432e9
Setup buildSrc
DerEchtePilz Sep 11, 2025
e9dfa20
Add empty Paper/Spigot/Velocity modules
DerEchtePilz Sep 11, 2025
5dbe76f
Make Kotlin examples compile
DerEchtePilz Sep 12, 2025
d6abfcf
Make Java examples compile
DerEchtePilz Sep 13, 2025
eb7d287
Update code references
DerEchtePilz Sep 13, 2025
bc22213
Use more Paper/Spigot preference switches
DerEchtePilz Sep 13, 2025
b897923
Update ranged-arguments.md to correctly mention the DoubleRangeArgument
DerEchtePilz Sep 13, 2025
50b2d67
Update entities-arguments.md to now metion PlayerProfileArgument inst…
DerEchtePilz Sep 13, 2025
8476ecf
Update adventure chat arguments page
DerEchtePilz Sep 13, 2025
8390216
Update BlockStateArgument page
DerEchtePilz Sep 13, 2025
a6ce6ad
Replace PlayerArgument with EntitySelectorArgument.OnePlayer where ap…
DerEchtePilz Sep 13, 2025
b1f3688
Update cast table and safe suggestion table
DerEchtePilz Sep 13, 2025
446df85
Update unregistration page
DerEchtePilz Sep 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update adventure chat arguments page
  • Loading branch information
DerEchtePilz committed Sep 13, 2025
commit 8476ecf3a81c98b1da4f39e204acb85f189255e9
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ We can construct a book using the Adventure API's `Book.book(Component, Componen

## Adventure chat argument

The `ChatArgument` represents infinitely long strings similar to the `GreedyStringArgument` and allows entity selectors such as `@e`, `@p` and so on. The `ChatArgument` returns a `Component`, similar to the `ChatComponentArgument`.
The `ChatArgument` represents infinitely long strings similar to the `GreedyStringArgument` and allows entity selectors such as `@e`, `@p` and so on. The `ChatArgument` returns a `SignedMessage`.

::::tip Example – Sending personalized messages to players

Expand All @@ -84,7 +84,7 @@ We want to create a personalized message broadcasted to all users using a chat c
/pbroadcast <message>
```

To broadcast an Adventure `Component` to all players on the server, we have to use Paper's `broadcast(Component, String)` method. This method requires a permission node which all players must have to receive the broadcasted message. By default, Bukkit-based servers (Spigot and Paper) use the `bukkit.broadcast.user` permission, which is described [here](https://bukkit.fandom.com/wiki/CraftBukkit_Commands#Additional_Permissions):
To broadcast an Adventure `Component` to all players on the server, we have to use Paper's `sendMessage(SignedMessage, Bound)` method.

:::tabs
===Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ The CommandAPI provides a number of ways to interact with chat formatting in Min
- **Chat**: Text which is said in chat. This also includes entity selectors such as `@a` and `@r`
- **ChatComponent**: Minecraft's [Raw JSON text format](https://minecraft.wiki/w/Raw_JSON_text_format)

The CommandAPI implements **ChatColor**, **Chat** and **ChatComponent** in two separate ways: [Spigot-compatible](./spigot-chat-arguments) and [Adventure-compatible](./adventure-chat-arguments). The differences between these and how to use them are described in their own relevant pages.

The CommandAPI also supports Minecraft 1.19's chat preview feature. To use Minecraft 1.19's chat preview feature, information on that can be found in [Chat preview](./chat-preview).
The CommandAPI implements **ChatColor**, **Chat** and **ChatComponent** in two separate ways: [Spigot-compatible](./spigot-chat-arguments) and [Adventure-compatible](./adventure-chat-arguments). The differences between these and how to use them are described in their own relevant pages.