
Client-Server Communication API
Communication API for Fabric client and Paper server
About this Mod
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());
}
}
Available Versions
How to Install Client-Server Communication API on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).
Install Mod
Open the mod browser in the dashboard and search for "Client-Server Communication API". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.21.11, 1.21.8
Server-side
✗ UnsupportedRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Client-Server Communication API server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.
Is Client-Server Communication API compatible with fabric and paper?
Client-Server Communication API officially supports fabric, paper for Minecraft 1.21.11, 1.21.8. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Client-Server Communication API – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Client-Server Communication API consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Rent Modded Server
Install Client-Server Communication API with just one click on your server.