UltraStaffChatPro API

The official Developer API of UltraStaffChatPro.

Adding USCPAPI to your Project

Remember to add UltraStaffChatPro to your plugin's dependencies in your plugin.yml file!

Current Version: 1.0.0

Maven
Gradle
Maven
<repository>
<id>joshualovescode</id>
<url>https://repo.joshualovescode.dev/releases</url>
</repository>
<dependency>
<groupId>dev.joshualovescode</groupId>
<artifactId>USCPAPI</artifactId>
<version>VERSION</version>
</dependency>
Gradle
allprojects {
repositories {
...
maven { url 'https://repo.joshualovescode.dev/releases' }
}
}
dependencies {
implementation 'dev.joshualovescode:USCPAPI:VERSION'
}

Events

Registering Listener

@Override
public void onEnable() {
getLogger().info("Plugin Enabled!");
EventManager eventManager = UltraStaffChatProAPI.getEventManager();
eventManager.registerListener(getDescription().getName(), new MyUSCPListener());
}

Listener

public class MyUSCPListener implements USCPListener {
@Override
public void onMessageReceived(USCPMessageEvent uscpMessageEvent) {
// Do something with message.
getLogger().info("[MESSAGE] "+uscpMessageEvent.getMessage().getPlayerName() + ": "+uscpMessageEvent.getMessage().getMessage());
}
}

Sending messages to USCP

StaffChat

UltraStaffChatProAPI.getAPI().sendMessage(new USCPMessage("PlayerName", "ServerName", "Message");

MultiChannel

UltraStaffChatPro.getAPI().sendMessage(new USCPMessage("ChannelName", "PlayerName", "ServerName", "Message");