Developer API
StarChat exposes a powerful Maven API allowing developers to intercept chat, trigger minigames, and modify player channels programmatically.
Adding the Dependency
You can include StarChat in your project via JitPack. Add the following to your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.VicEntity</groupId>
<artifactId>StarChat-API</artifactId>
<version>VERSION</version>
<scope>provided</scope>
</dependency>
</dependencies>Listening to Custom Events
StarChat fires custom Bukkit events that you can listen to using standard event handlers.
API Instance
// Get the main API instance
StarChatAPI api = StarChatProvider.getAPI();
// Dispatch a custom minigame manually
api.getMinigameManager().startMathEvent();
// Add a player to the global channel
api.getChannelManager().joinChannel(player.getUniqueId(), "global");