This is the repository of the Cytooxien Realm API. Here you can find the wiki which contain basic information about the usage of this API.
Repository:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>Dependencies:
<dependency> <groupId>com.github.cytooxien</groupId> <artifactId>realms-api</artifactId> <version>4.0.1</version> <scope>provided</scope> </dependency>Repository:
repositories {
maven {
url 'https://jitpack.io'
}
}Dependencies:
dependencies {
compileOnly 'com.github.cytooxien:realms-api:4.0.1'
}All providers are registered using Bukkit's internal ServicesManager. This is how you get an instance of a provider:
RealmInformationProviderinformationProvider = Bukkit.getServicesManager().load(RealmInformationProvider.class);You can access the display system using the following code:
DisplayProviderdisplayProvider = Bukkit.getServicesManager().load(DisplayProvider.class);This is a quick example on how to change the prefix of a player:
DisplayProviderdisplayProvider = Bukkit.getServicesManager().load(DisplayProvider.class);
// changes the chat prefix of a playerdisplayProvider.setCustomChatPrefix(player, Component.text("Group", NamedTextColor.RED));
// changes the tab prefix of a playerdisplayProvider.setCustomTabPrefix(player, Component.text("Group", NamedTextColor.RED));