Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default defineConfig({
},

{ icon: "github", label: "adventure:GitHub", href: "https://github.com/PaperMC/adventure" },
{ icon: "seti:java", label: "adventure:Javadoc", href: "https://jd.advntr.dev" },
{ icon: "seti:java", label: "adventure:Javadoc", href: "https://jd.papermc.io/adventure" },

{ icon: "github", label: "waterfall:GitHub", href: "https://github.com/PaperMC/Waterfall" },
{
Expand Down Expand Up @@ -569,6 +569,7 @@ export default defineConfig({
targets: {
paper: "https://jd.papermc.io/paper",
velocity: "https://jd.papermc.io/velocity",
adventure: "https://jd.papermc.io/adventure",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only "issue" is the whole module reference like (jd:adventure:net.kyori.adventure.api:net.kyori.adventure.sound.Sound.Emitter#self()) maybe can be good include all the modules like adventure_api: { url: "https://jd.papermc.io/adventure", module: "net.kyori.adventure.api" }, and then use (jd:adventure_api:net.kyori.adventure.sound.Sound.Emitter#self()) but its just for have less text in the component....

java: { url: "https://docs.oracle.com/en/java/javase/25/docs/api", module: "java.base" },
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/adventure/minimessage/format.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Tag
* `<click:_action_:_value_>`

Arguments
* `_action_`, the type of click event, one of [this list](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/event/ClickEvent.Action.html#enum.constant.summary)
* `_action_`, the type of click event, one of [this list](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.event.ClickEvent.Action#enum.constant.summary)
* `_value_`, the argument for that particular event, refer to [the minecraft wiki](https://minecraft.wiki/w/Text_component_format)

Examples
Expand All @@ -234,7 +234,7 @@ Tag
* `<hover:_action_:_value_>`

Arguments
* `_action_`, the type of hover event, one of this [list](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/event/HoverEvent.Action.html#field.summary)
* `_action_`, the type of hover event, one of this [list](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.event.HoverEvent.Action#field.summary)
* `_value_`, argument(s) specific to each event action:

[//]: # (FIXME: Starlight's padding doesn't apply for a spanned cell, so a manual padding is added)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static LiteralCommandNode<CommandSourceStack> componentArgument() {
<Video src={ComponentMp4} />

## Key argument
The key argument allows a user to put in any artificial (namespaced) key, ensuring its validity. This returns a [`Key`](https://jd.advntr.dev/key/latest/net/kyori/adventure/key/Key.html),
The key argument allows a user to put in any artificial (namespaced) key, ensuring its validity. This returns a [`Key`](jd:adventure:net.kyori.adventure.key:net.kyori.adventure.key.Key),
which can be used at various other places in the Paper API.

### Example usage
Expand All @@ -74,7 +74,7 @@ public static LiteralCommandNode<CommandSourceStack> keyArgument() {

## Named color argument
This argument provides the user with the ability to select between the 16 built-in "named" text colors. This argument returns a
[`NamedTextColor`](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/format/NamedTextColor.html),
[`NamedTextColor`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.format.NamedTextColor),
which you can use for applying a color to components.

### Example usage
Expand Down Expand Up @@ -108,7 +108,7 @@ do not know how to use that format and thus its general usage is not advised.

:::

The style argument returns its value in the form of a [`Style`](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/format/Style.html) object.
The style argument returns its value in the form of a [`Style`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.format.Style) object.
This can be applied to any component using `Component#style(Style)`. Whilst the JSON input allows for the `text` field, its content is completely ignored.

### Example usage
Expand Down Expand Up @@ -143,7 +143,7 @@ A signed message argument returns a `SignedMessageResolver`. In order to call it
* The argument name
* The `CommandContext<CommandSourceStack>` object

The resolved value is a `CompletableFuture<SignedMessage>`, whose [`SignedMessage`](https://jd.advntr.dev/api/latest/net/kyori/adventure/chat/SignedMessage.html)
The resolved value is a `CompletableFuture<SignedMessage>`, whose [`SignedMessage`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.chat.SignedMessage)
value you can handle using `thenAccept(Consumer<T>)`. Inside of the consumer, you can send the signed message to players or work with it in other ways.

:::caution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A quick overview of all possible arguments is defined here:
|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
| `blockPosition()` | [BlockPositionResolver](jd:paper:io.papermc.paper.command.brigadier.argument.resolvers.BlockPositionResolver) | [Block Position Argument](/paper/dev/command-api/arguments/location#block-position-argument) |
| `blockState()` | [BlockState](jd:paper:org.bukkit.block.BlockState) | [Block State Argument](/paper/dev/command-api/arguments/paper#block-state-argument) |
| `component()` | [Component (Kyori)](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/Component.html) | [Component Argument](/paper/dev/command-api/arguments/adventure#component-argument) |
| `component()` | [Component (Kyori)](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.Component) | [Component Argument](/paper/dev/command-api/arguments/adventure#component-argument) |
| `doubleRange()` | [DoubleRangeProvider](jd:paper:io.papermc.paper.command.brigadier.argument.range.DoubleRangeProvider) | [Double Range argument](/paper/dev/command-api/arguments/predicate#double-range-argument) |
| `entity()` | [EntitySelectorArgumentResolver](jd:paper:io.papermc.paper.command.brigadier.argument.resolvers.selector.EntitySelectorArgumentResolver) | [Entity Argument](/paper/dev/command-api/arguments/entity-player#entity-argument) |
| `entities()` | [EntitySelectorArgumentResolver](jd:paper:io.papermc.paper.command.brigadier.argument.resolvers.selector.EntitySelectorArgumentResolver) | [Entities Argument](/paper/dev/command-api/arguments/entity-player#entities-argument) |
Expand All @@ -25,16 +25,16 @@ A quick overview of all possible arguments is defined here:
| `integerRange()` | [IntegerRangeProvider](jd:paper:io.papermc.paper.command.brigadier.argument.range.IntegerRangeProvider) | [Integer Range Argument](/paper/dev/command-api/arguments/predicate#integer-range-argument) |
| `itemPredicate()` | [ItemStackPredicate](jd:paper:io.papermc.paper.command.brigadier.argument.predicate.ItemStackPredicate) | [Item Predicate Argument](/paper/dev/command-api/arguments/predicate#item-predicate-argument) |
| `itemStack()` | [ItemStack](jd:paper:org.bukkit.inventory.ItemStack) | [ItemStack Argument](/paper/dev/command-api/arguments/paper#itemstack-argument) |
| `key()` | [Key (Kyori)](https://jd.advntr.dev/key/latest/net/kyori/adventure/key/Key.html) | [Key Argument](/paper/dev/command-api/arguments/adventure#key-argument) |
| `namedColor()` | [NamedTextColor (Kyori)](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/format/NamedTextColor.html) | [Named Color Argument](/paper/dev/command-api/arguments/adventure#named-color-argument) |
| `key()` | [Key (Kyori)](jd:adventure:net.kyori.adventure.key:net.kyori.adventure.key.Key) | [Key Argument](/paper/dev/command-api/arguments/adventure#key-argument) |
| `namedColor()` | [NamedTextColor (Kyori)](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.format.NamedTextColor) | [Named Color Argument](/paper/dev/command-api/arguments/adventure#named-color-argument) |
| `namespacedKey()` | [NamespacedKey](jd:paper:org.bukkit.NamespacedKey) | [Bukkit NamespacedKey Argument](/paper/dev/command-api/arguments/paper#namespacedkey-argument) |
| `objectiveCriteria()` | [Criteria](jd:paper:org.bukkit.scoreboard.Criteria) | [Objective Criteria Argument](/paper/dev/command-api/arguments/paper#objective-criteria-argument) |
| `player()` | [PlayerSelectorArgumentResolver](jd:paper:io.papermc.paper.command.brigadier.argument.resolvers.selector.PlayerSelectorArgumentResolver) | [Player Argument](/paper/dev/command-api/arguments/entity-player#player-argument) |
| `players()` | [PlayerSelectorArgumentResolver](jd:paper:io.papermc.paper.command.brigadier.argument.resolvers.selector.PlayerSelectorArgumentResolver) | [Players Argument](/paper/dev/command-api/arguments/entity-player#players-argument) |
| `playerProfiles()` | [PlayerProfileListResolver](jd:paper:io.papermc.paper.command.brigadier.argument.resolvers.PlayerProfileListResolver) | [Player Profiles Argument](/paper/dev/command-api/arguments/entity-player#player-profiles-argument) |
| `resource(RegistryKey)` | (Depends on RegistryKey) | [Resource Argument](/paper/dev/command-api/arguments/registry#resource-argument) |
| `resourceKey(RegistryKey)` | (Depends on RegistryKey) | [Resource Key Argument](/paper/dev/command-api/arguments/registry#resource-key-argument) |
| `style()` | [Style (Kyori)](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/format/Style.html) | [Style Argument](/paper/dev/command-api/arguments/adventure#adventure-style-argument) |
| `style()` | [Style (Kyori)](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.format.Style) | [Style Argument](/paper/dev/command-api/arguments/adventure#adventure-style-argument) |
| `signedMessage()` | [SignedMessageResolver](jd:paper:io.papermc.paper.command.brigadier.argument.SignedMessageResolver) | [Signed Message Argument](/paper/dev/command-api/arguments/adventure#signed-message-argument) |
| `scoreboardDisplaySlot()` | [DisplaySlot](jd:paper:org.bukkit.scoreboard.DisplaySlot) | [Scoreboard Display Slot Argument](/paper/dev/command-api/arguments/enums#scoreboard-display-slot-argument) |
| `time(int mintime)` | Integer | [Time Argument](/paper/dev/command-api/arguments/paper#time-argument) |
Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/paper/dev/api/component-api/audiences.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ All `CommandSender`s are single audiences. This includes players, the console, a
`World` are all forwarding audiences. This means that they are made up of multiple audiences. For example, the server is
made up of all online players and the console.

This means that all the [`Audience`](https://jd.advntr.dev/api/latest/net/kyori/adventure/audience/Audience.html)
This means that all the [`Audience`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.audience.Audience)
methods are available on [`CommandSender`](jd:paper:org.bukkit.command.CommandSender),
[`Server`](jd:paper:org.bukkit.Server), [`Team`](jd:paper:org.bukkit.scoreboard.Team)
and [`World`](jd:paper:org.bukkit.World).

## `ForwardingAudience`

The [`ForwardingAudience`](https://jd.advntr.dev/api/latest/net/kyori/adventure/audience/ForwardingAudience.html)
wraps a collection of [`Audience`](https://jd.advntr.dev/api/latest/net/kyori/adventure/audience/Audience.html)
The [`ForwardingAudience`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.audience.ForwardingAudience)
wraps a collection of [`Audience`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.audience.Audience)
instances and forwards messages to all of them. This is useful for sending messages to multiple audiences (players) at once.

```java
Expand All @@ -37,8 +37,8 @@ Audience audience = Audience.audience(Audience...);
## What do `Audience`s do?

Audiences are used for interacting with players. They can be used to send messages, play sounds, show bossbars, and more.
They are mostly used for sending other parts of the API to players. For example, you can send a [`Component`](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/Component.html)
to a player using [`Audience#sendMessage(Component)`](https://jd.advntr.dev/api/latest/net/kyori/adventure/audience/Audience.html#sendMessage(net.kyori.adventure.text.Component)).
They are mostly used for sending other parts of the API to players. For example, you can send a [`Component`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.Component)
to a player using [`Audience#sendMessage(Component)`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.audience.Audience#sendMessage(net.kyori.adventure.text.Component)).

## Pointers

Expand Down
8 changes: 4 additions & 4 deletions src/content/docs/paper/dev/api/component-api/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ translation layer to almost all text that ends up being displayed to clients.

:::note[Javadocs]

Adventure's Javadocs for all-things translations can be found [here](https://jd.advntr.dev/api/latest/net/kyori/adventure/translation/package-summary.html).
Adventure's Javadocs for all-things translations can be found [here](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.translation.package-summary).

:::

## GlobalTranslator

All translation is done through [`GlobalTranslator`](https://jd.advntr.dev/api/latest/net/kyori/adventure/translation/GlobalTranslator.html).
All translation is done through [`GlobalTranslator`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.translation.GlobalTranslator).
You can render translations yourself and add new sources for translations.

You can add sources to the `GlobalTranslator` by creating instances of [`TranslationStore`](https://jd.advntr.dev/api/latest/net/kyori/adventure/translation/TranslationStore.html)
or implementing the [`Translator`](https://jd.advntr.dev/api/latest/net/kyori/adventure/translation/Translator.html) interface yourself.
You can add sources to the `GlobalTranslator` by creating instances of [`TranslationStore`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.translation.TranslationStore)
or implementing the [`Translator`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.translation.Translator) interface yourself.

## Where translations work

Expand Down
16 changes: 8 additions & 8 deletions src/content/docs/paper/dev/api/component-api/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,30 +158,30 @@ There are online tools to make generating this format much easier like [JSON Tex
## Serializers

Paper and Velocity come bundled with different serializers for converting between
[`Component`](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/Component.html)s and other forms of serialized text.
[`Component`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.Component)s and other forms of serialized text.

### [`GsonComponentSerializer`](https://jd.advntr.dev/text-serializer-gson/latest)
### [`GsonComponentSerializer`](jd:adventure:net.kyori.adventure.text.serializer.gson:module-summary)

Converts between `Component`
and JSON-formatted strings with convenience methods to directly deal with Gson's
[`JsonElement`](https://javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonElement.html).
This conversion is lossless and is the preferred form of serialization for components that do not have to be edited by users regularly.

### [`MiniMessage`](https://jd.advntr.dev/text-minimessage/latest)
### [`MiniMessage`](jd:adventure:net.kyori.adventure.text.minimessage:module-summary)

Converts between `Component`
and a MiniMessage-formatted string. This conversion is lossless and is the preferred form of
serialization for components that have to be edited by users. There is also extensive customization you can add to the
serializer, which is [documented here](/adventure/minimessage/api/#getting-started).

### [`PlainTextComponentSerializer`](https://jd.advntr.dev/text-serializer-plain/latest)
### [`PlainTextComponentSerializer`](jd:adventure:net.kyori.adventure.text.serializer.plain:module-summary)

Serializes a `Component` into a plain text string. This is very lossy as all style information as well as most other
types of components will lose information. There may be special handling for
[`TranslatableComponent`](https://jd.advntr.dev/api/latest/net/kyori/adventure/text/TranslatableComponent.html)s to be serialized
[`TranslatableComponent`](jd:adventure:net.kyori.adventure.api:net.kyori.adventure.text.TranslatableComponent)s to be serialized
into a default language, but generally this shouldn't be used except in certain circumstances, like logging to a text file.

### [`LegacyComponentSerializer`](https://jd.advntr.dev/text-serializer-legacy/latest)
### [`LegacyComponentSerializer`](jd:adventure:net.kyori.adventure.text.serializer.legacy:module-summary)

:::caution

Expand All @@ -206,7 +206,7 @@ final String miniMessageString = MiniMessage.miniMessage().serialize(

There are 2 built-in legacy serializers, one dealing with `§` symbols and the other for
`&` symbols. They have their own instances available through
[`LegacyComponentSerializer#legacySection()`](https://jd.advntr.dev/text-serializer-legacy/latest/net/kyori/adventure/text/serializer/legacy/LegacyComponentSerializer.html#legacySection())
and [`LegacyComponentSerializer#legacyAmpersand()`](https://jd.advntr.dev/text-serializer-legacy/latest/net/kyori/adventure/text/serializer/legacy/LegacyComponentSerializer.html#legacyAmpersand()).
[`LegacyComponentSerializer#legacySection()`](jd:adventure:net.kyori.adventure.text.serializer.legacy:net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer#legacySection())
and [`LegacyComponentSerializer#legacyAmpersand()`](jd:adventure:net.kyori.adventure.text.serializer.legacy:net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer#legacyAmpersand()).

:::
Loading
Loading