Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

anticheat-test.com Custom Payload Reference

A reference for all custom payloads supported by this server that clients can interact with.

Warning

Only send these payloads when you are certain the player is connected to anticheat-test.com. It is strongly recommended that you verify this through in-game context - such as scoreboard entries or tab list (player list) information, rather than by checking the server's domain name directly. Sending these payloads to unintended servers could have unexpected consequences.


sendRawPayload Utility

Modern clients rely on this helper for sending custom payloads. See the implementation here.

sendRawPayload implementation
publicstaticvoidsendRawPayload(Identifierid, byte[] data) {
Channelchannel = MC.getConnection().getConnection().channel;
if (!channel.isOpen()) return;
try {
finalPacketEncoder<?> encoder = (PacketEncoder<?>) channel.pipeline().get("encoder");
if (encoder == null) return;
finalObjectcodec = encoder.protocolInfo.codec();
if (!(codecinstanceofIdDispatchCodec)) return;
finalIdDispatchCodec<?, ?, Object> dispatchCodec = (IdDispatchCodec<?, ?, Object>) codec;
finalintpacketId = dispatchCodec.toId.getOrDefault(CommonPacketTypes.SERVERBOUND_CUSTOM_PAYLOAD, -1);
if (packetId == -1) return;
finalFriendlyByteBufbuf = newFriendlyByteBuf(channel.alloc().buffer());
buf.writeVarInt(packetId);
buf.writeIdentifier(id);
buf.writeBytes(data);
channel.writeAndFlush(buf);
} catch (Exceptione) {
e.printStackTrace();
}
}

Anti-Debugger

Sent by the client to notify the server that the /packetdebugger command should be blocked

1.8 Clients

mc.getNetHandler().addToSendQueue(newC17PacketCustomPayload(
"ACT|Debugger",
newPacketBuffer(Unpooled.buffer())
));
FieldValue
ChannelACT|Debugger
Payload(empty)

Modern Clients

Channel: act_debugger:act_debugger

sendRawPayload(
Identifier.fromNamespaceAndPath("act_debugger", "act_debugger"),
newbyte[]{}
);
FieldValue
Namespaceact_debugger
Pathact_debugger
Payload(empty)

Note-Bot Update (modern server only)

Sent by the client to report the current playback state of a note block song.

Channel: anticheat_test:note_bot_update

Payload Structure

OrderTypeFieldNotes
1StringsongNameFalls back to filename (without .nbs) if empty
2StringartistNameFalls back to "Unknown" if empty
3floattargetProgressPlayback progress (0.0 – 1.0)
4booleantuningWhether tuning mode is active

Sending Example

FriendlyByteBufbuffer = newFriendlyByteBuf(Unpooled.buffer());
StringsongName = this.song.name;
StringartistName = this.song.author;
if (songName == null || songName.isEmpty()) songName = this.song.filename.replaceFirst(".nbs", "");
if (artistName == null || artistName.isEmpty()) artistName = "Unknown";
buffer.writeUtf(songName);
buffer.writeUtf(artistName);
buffer.writeFloat(this.targetProgress);
buffer.writeBoolean(this.tuning);
byte[] bufferData = newbyte[buffer.readableBytes()];
buffer.readBytes(bufferData);
sendRawPayload(
Identifier.fromNamespaceAndPath("anticheat_test", "note_bot_update"),
bufferData
);

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors