Skip to content
Matej edited this page Feb 9, 2024 · 4 revisions

If you are a developer, ChatControl offers you a ton of methods to implement your own functionality into this plugin.

We are not obfuscating our plugin so you can literally see everything to your heart's content without obtaining direct binaries access.

Adding a custom party

You can create a chat channel where only players joined in the same group (party, town, plot etc.) can see each others' messages. Here is how:

Step 1:

Put ChatControl to softDepend in your plugin.yml. Then register your party name, here "myplugin-claim" in your onLoad() method in your main plugin's class using the sample code:

Party.register("myplugin-claim", (receiver, sender) -> {
	Claim claim = YourPlugin.findClaimLocation(receiver.getLocation()); // Edit this to your needs
	List<UUID> claimPlayers = claim.getOnlinePlayers();
	
        // Check if both sender/receiver are joined in the same channel so they can see each other's message
	return claimPlayers.contains(sender.getUniqueId()) && claimPlayers.contains(receiver.getUniqueId());
});

Step 2:

You can now use the party in the Party key in Channels.List in settings.yml to turn any channel into a party one.

Example

API classes

Here's our single API package. You can start in the ChatControlAPI class. Since we're not obfuscated, you'll get full unlimited access to all other parts of the plugin outside the api package.

API