Client-Server Communication API
Communication API for Fabric client and Paper server
by Danrus110_
FabricPaper
- Loaders
- FabricPaper
- Downloads on Modrinth
- 335
- Followers on Modrinth
- 1
- versions
- 4
- Updated
- February 14, 2026Feb 14
- Published
- in 2026
At a glance
Runs on Fabric and Paper
For Minecraft 1.21.8, 1.21.11
Latest version — 1.0 from February 14, 2026
License MIT — free
Where it's neededGame versions1.21.8, 1.21.11
In gameunknownOn serverunknown
The author didn't say where the mod is needed
Client-Server Communication API
how to use for developer:
- Register packet in common code:
public class FooBarPacket implements CscPacket{
public FooBarPacket(ByteBuf buf) {
read(buf);
}
private int foo;
@Override
public void read(ByteBuf buf) {
foo = buf.readInt();
}
@Override
public void write(ByteBuf buf) {
buf.writeInt(foo);
}
}public static CscPacketType<FooBarPacket> FOO_BAR_PACKET = CscApi.registerPacket(
"foo_bar",
FooBarPacket.class,
FooBarPacket::new
);- Use it on Server:
public class ServerClass {
private static final Logger log = LoggerFactory.getLogger(ServerClass.class);
public void init() {
CscServer.getService().registerListener((packet, player) -> {
log.info("Received packet {} from player {}", packet.getClass().getSimpleName(), player.getName());
}, ModPackets.FOO_BAR_PACKET);
}
public void sendFooBarPacket(Player player) {
CscServer.getService().sendPacket(new FooBarPacket(), player);
}
}- Use it on Client:
public class ClientClass {
private static final Logger log = LoggerFactory.getLogger(ClientClass.class);
public void init() {
CscClient.getService().registerListener(packet -> {
log.info("Received packet: {}", packet);
}, ModPackets.FOO_BAR_PACKET);
}
public void sendFooBarPacket() {
CscClient.getService().sendPacket(new FooBarPacket());
}
}FAQ
How to install Client-Server Communication API?
Install Fabric for your Minecraft version, download Client-Server Communication API for the same version and loader, put the file into the mods folder and launch the game with the loader profile.
Which Minecraft versions does Client-Server Communication API support?
Client-Server Communication API has builds for Minecraft 1.21.8, 1.21.11.
License and source
MIT Licensefree to use and share with credit to the author