Skip to content
Matej edited this page Jan 17, 2025 · 5 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

We recommend you use a Java decompiler such as jd_gui to view our plugin's packages, since they are not obfuscated. Here is an overview of our API package:

API

Clone this wiki locally