-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
473 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"introduction": "Introduction", | ||
"protobuf": "Protobuf" | ||
"protobuf": "Protobuf", | ||
"json": "JSON" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"getting-started": "Getting Started", | ||
"player-detection": "Player Detection", | ||
"packet-util": "Packet Util", | ||
"object-util": "Object Util", | ||
"adventure-util": "Adventure Util" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Adventure Util | ||
|
||
## Overview | ||
|
||
Provides a single method responsible for serializing the Adventure Component to a String | ||
|
||
## Integration | ||
|
||
```java | ||
public static String toJson(@NonNull Component component) { | ||
return GsonComponentSerializer.gson().serialize(component); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Tab, Tabs } from 'nextra-theme-docs' | ||
|
||
# Getting Started | ||
|
||
## Overview | ||
|
||
This method involves manually constructing JSON objects using a JSON library (e.g., Gson) and then converting these objects into byte arrays for transmission. It allows for dynamic and programmatic construction of JSON objects, offering flexibility in modifying the JSON structure. Available fields for each message, including their types, are available on the Buf Schema Registry at https://buf.build/lunarclient/apollo. | ||
While constructing messages, note that the `@type` field isn't required if the message is being sent within a message. | ||
|
||
<Callout type="info"> | ||
Note that this method uses a different plugin channel for sending packets, | ||
which is `apollo:json`, while still using the `lunar:apollo` for player detection. | ||
</Callout> | ||
|
||
## Integration Examples | ||
|
||
π [Sending Apollo packets & Enabling Apollo modules](/apollo/developers/lightweight/json/packet-util)<br/> | ||
π [Detecting players using LunarClient](/apollo/developers/lightweight/json/player-detection)<br/> | ||
π [Common Apollo Objects](/apollo/developers/lightweight/json/object-util)<br/> | ||
π [Adventure Util](/apollo/developers/lightweight/json/adventure-util)<br/> | ||
|
||
TODO mention module examples |
Oops, something went wrong.
a42f0d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Documentation Deployment
preview