Skip to content

Repository files navigation

Logo

Realms Api

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.

Maven

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>

Gradle

Repository:

repositories {
maven {
url 'https://jitpack.io'
}
}

Dependencies:

dependencies {
compileOnly 'com.github.cytooxien:realms-api:4.0.1'
}

Access Providers

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);

Access Display System

You can access the display system using the following code:

DisplayProviderdisplayProvider = Bukkit.getServicesManager().load(DisplayProvider.class);

Changing the prefix of a player

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));

About

The official api for interacting with Cytooxien Realms

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages