Community listing page, reviews here may not be monitored by the author.
Client-Server Communication API
No reviews yet
Communication API for Fabric client and Paper server
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Runs entirely on the client. Works on vanilla servers.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
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());
}
}
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers