Using Rory or Catgate as a dependency - RoryMCDev/RoryMC GitHub Wiki
To start, add the Open Collaboration repository to your project:
<repository>
<id>opencollab-snapshot-repo</id>
<url>https://repo.opencollab.dev/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Add Rory's common codebase as a dependency:
<dependency>
<groupId>org.geysermc</groupId>
<artifactId>connector</artifactId>
<version>1.2.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
To get a Rory player, or check if a player is from Bedrock:
GeyserSession session = GeyserConnector.getInstance().getPlayerByUuid(uuid);
session
can be null if such a player does not exist on Rory.
GeyserConnector.getInstance()
will be null until after the Geyser plugin enables.
See https://github.com/Camotoy/floodgate-skript/blob/master/pom.xml as a reference for now; this documentation will later be updated for Floodgate 2.0.