Basic update to dependency page for new Geyser API

This commit is contained in:
Camotoy authored and GitHub committed 2022-10-07 19:11:56 -04:00
1 parent cb52ea3baf
commit a6ed6db953
1 file changed
+8 -16
@@ -9,27 +9,19 @@ To start, add the Open Collaboration repository to your project:
```xml
<repository>
<id>opencollab-snapshot-repo</id>
<url>https://repo.opencollab.dev/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>https://repo.opencollab.dev/main/</url>
</repository>
```
## Using Geyser
*Please note: this information will be updated with a new API at a later point, but the old API structure will continue to work.*
Add Geyser's common codebase as a dependency:
Add Geyser's API codebase as a dependency:
```xml
<dependency>
<groupId>org.geysermc</groupId>
<artifactId>core</artifactId>
<version>2.0.0-SNAPSHOT</version>
<groupId>org.geysermc.geyser</groupId>
<artifactId>api</artifactId>
<version>2.1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
@@ -37,12 +29,12 @@ Add Geyser's common codebase as a dependency:
To get a Geyser player, or check if a player is from Bedrock:
```java
GeyserSession session = GeyserConnector.getInstance().getPlayerByUuid(uuid);
GeyserConnection connection = GeyserApi.api().connectionByUuid(uuid);
```
`session` can be null if such a player does not exist on Geyser.
`connection` can be null if such a player does not exist on Geyser.
`GeyserConnector.getInstance()` will be null until after the Geyser plugin enables.
`GeyserApi.api()` may be null until after the Geyser plugin enables.
## Using Floodgate