0x3F S3FPacketCustomPayload

Sends a plugin channel message from server to client. Used for mod/plugin communication.

Clientbound (Server → Client) · PLAY · net/minecraft/network/play/server/S3FPacketCustomPayload.java

Published 2026-06-18 · Updated 2026-10-14

pluginmoddingchannel
Comprehensive 8/8

Fields

FieldTypeDescription
channelStringPlugin channel name
dataPacketBufferChannel-specific payload

Wire Encoding

FieldTypeNotes
ChannelStringPlugin channel identifier
Data Lengthshort
Databyte[]Channel-specific payload

MCP References

MCPNetHandlerPlayClient.handleCustomPayload()

Handler Interface

HNDINetHandlerPlayClient

Notes

Common channels: "MC|Brand" (server brand), "MC|AdvCmd" (command block update), "MC|TrList" (villager trades), "MC|RPack" (resource pack).

Vanilla Source

S3FPacketCustomPayload.java73 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import io.netty.buffer.ByteBuf;
4
import java.io.IOException;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayClient;
8
9
public class S3FPacketCustomPayload implements Packet<INetHandlerPlayClient>
10
{
11
    private String channel;
12
    private PacketBuffer data;
13
14
    public S3FPacketCustomPayload()
15
    {
16
    }
17
18
    public S3FPacketCustomPayload(String channelName, PacketBuffer dataIn)
19
    {
20
        this.channel = channelName;
21
        this.data = dataIn;
22
23
        if (dataIn.writerIndex() > 1048576)
24
        {
25
            throw new IllegalArgumentException("Payload may not be larger than 1048576 bytes");
26
        }
27
    }
28
29
    /**
30
     * Reads the raw packet data from the data stream.
31
     */
32
    public void readPacketData(PacketBuffer buf) throws IOException
33
    {
34
        this.channel = buf.readStringFromBuffer(20);
35
        int i = buf.readableBytes();
36
37
        if (i >= 0 && i <= 1048576)
38
        {
39
            this.data = new PacketBuffer(buf.readBytes(i));
40
        }
41
        else
42
        {
43
            throw new IOException("Payload may not be larger than 1048576 bytes");
44
        }
45
    }
46
47
    /**
48
     * Writes the raw packet data to the data stream.
49
     */
50
    public void writePacketData(PacketBuffer buf) throws IOException
51
    {
52
        buf.writeString(this.channel);
53
        buf.writeBytes((ByteBuf)this.data);
54
    }
55
56
    /**
57
     * Passes this Packet on to the NetHandler for processing.
58
     */
59
    public void processPacket(INetHandlerPlayClient handler)
60
    {
61
        handler.handleCustomPayload(this);
62
    }
63
64
    public String getChannelName()
65
    {
66
        return this.channel;
67
    }
68
69
    public PacketBuffer getBufferData()
70
    {
71
        return this.data;
72
    }
73
}

Deobfuscated MCP 1.8.9 source of S3FPacketCustomPayload, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S3FPacketCustomPayload.java) at build time and verified present.

Deep Dive

Role in the protocol

The clientbound plugin message. A channel name string (20-char cap) plus a raw PacketBuffer payload capped at 1048576 bytes. Vanilla channels include MC|Brand (server brand, sent once at join), MC|TrList (villager trades), MC|BOpen (book opening), and MC|AdvCmd (command block updates). handleCustomPayload dispatches by channel name; unknown channels are ignored. This is the standard bus for server-to-client mod and plugin communication.

Vanilla handling

handleCustomPayload branches on the channel: MC|TrList decodes the merchant recipe list into the open GuiMerchant, MC|Brand stores the brand string on the player, MC|BOpen opens the written-book GUI. The buffer is released in a finally block. Channel length is capped at 20 and the payload at 1MB, with an IOException on overflow.

Why clients touch it

Rise 5.99 PacketDebugger logs the channel name of every S3FPacketCustomPayload to chat via Rise.addChatMessage, as part of anti-cheat fingerprinting: the module also times keepalives and transactions. Reading MC|Brand is the standard server-identity read: brand strings identify Paper, Purpur, BungeeCord, and plugin stacks before a bypass picks a mode. Rise 6.x registers the class in the script API. The dedicated BrandDetector modules of the wider ecosystem (Flux, Lycoris) sit outside this corpus, so PacketDebugger is the only real consumer here.

Exploit surface

Purely observational. The payload is server-controlled; a malicious server can send oversized or malformed payloads, but the 1MB cap and try/finally release keep the vanilla path safe. Clients read the channel and payload for fingerprinting, and nothing is sent back, so servers cannot detect the read. The detection value is the brand string itself, which identifies the server stack before a disabler selects a mode.

Server-Side Handling

ServerConfigurationManager sends MC|Brand once per join with the server mod name. EntityPlayerMP sends MC|TrList when a player opens a merchant and MC|BOpen when opening a written book. The channel table is per-connection; the vanilla client only receives S3F and never echoes it. The wire payload length is the remaining readable bytes, capped at 1MB.

Protocol Analysis

readPacketData reads the channel (20-char cap), then takes the remaining readable bytes as the payload buffer, rejecting anything over 1048576 bytes with an IOException. writePacketData writes the channel then the raw buffer bytes. The payload is channel-specific; parsers must know the channel before reading fields from the buffer.

Anti-Cheat Landscape

Passive surface. The brand and channel names fingerprint the server stack; anti-cheats that send their own channels (version checks, telemetry) leak their presence through this packet. Clients never echo S3F, so the read is undetectable server-side. No anti-cheat in the corpus flags the packet itself.

implementation Implementation Cases

The clientbound plugin channel. Rise 5.99's PacketDebugger logs every channel name to chat for anti-cheat fingerprinting, and the MC|Brand channel is the standard server-identity read. Rise 6.x only registers the class in its script API.

PacketDebugger (Rise 5.99)

Fingerprint the server's anti-cheat and network behavior by logging plugin channels and packet timing to chat.

onPacketSend logs C0FPacketConfirmTransaction window id and uid with inter-arrival milliseconds, C00PacketKeepAlive key with inter-arrival milliseconds, and S3FPacketCustomPayload channel name via Rise.addChatMessage. The S3F branch catches clientbound payloads as they pass through the event.

Source: Rise 5.99, dev/rise/module/impl/other/PacketDebugger.java

Vanilla hook: PacketSendEvent.
Logging only, no mutation, nothing flaggable. The timing output doubles as a manual check of server keepalive/transaction behavior.
Variations: None in the corpus. Rise 6.x drops the module and exposes the class through the script API instead.
NetworkAPI (script API) (Rise 6.1.30, Rise 6.2.4)

Expose the packet class to Rise's JavaScript scripting API.

S3FPacketCustomPayload is listed in the clientbound Class array of NetworkAPI.java (line 106).

Source: Rise 6.1.30, com/alan/clients/script/api/NetworkAPI.java

Vanilla hook: None directly.
None. Registry only.
Variations: 6.2.4 ships the byte-identical file with the Client-release2 path prefix.
Rise 5.99: PacketSendEvent. Rise 6.x: script API table.
Rise 5.99 logs the packet through its event bus; Rise 6.x exposes the class to scripts. No client in the corpus cancels or forges S3F.

anticheat Anti-Cheat Checks

S3F is the outbound plugin channel, and the corpus splits by direction. The inbound machinery dominates the keyword matches: brand recognition (Grim ClientBrand, Shard ClientBrand, Truthful BrandListener, Photon BrandChannelData, intave PayloadInReader and SettingsTracker, LightAntiCheat ClientBrandRecognizer), payload frequency (Arc PayloadFrequency), payload exploits (Grim ExploitA and ExploitB), and badpackets (Frequency BadPacketsD, Hydro BadPacketsC, FlopAC BadPacketsF and BadPacketsG) all consume the client-to-server payload and appear here because the search terms overlap. The genuine S3F consumers are the anticheats' own outbound payloads: Photon rewrites the outgoing brand so clients cannot fingerprint the server, intave emits a brand-channel mark to authenticate its companion client, and Negativity sends FML handshake probes to enumerate Forge mods. Artemis and Negativity register the packet classes (SERVER_PLAY+21, CUSTOM_PAYLOAD_IN and CUSTOM_PAYLOAD_OUT).

BrandHider (Photon) (Photon-GitHub-AntiCheatAddition)

Stop clients from fingerprinting the server: rewrite every outbound brand payload to a configured fake brand.

Two PacketAdapterBuilder listeners hook the outbound PLUGIN_MESSAGE packets (Configuration.Server and Play.Server, the S3F path) with onSendingRaw. When the channel is the brand channel (MC|Brand or minecraft:brand), the payload data is replaced with createBrandPayload of the configured brand ('Some Spigot' by default) and the packet is marked for re-encode. On join, and at an optional refresh rate, the module also pushes an empty brand payload so the adapter has something to rewrite.

Detects: Clients and disablers that read the server brand to pick a bypass mode; the rewrite keeps the advertised stack generic.

Source: Photon-GitHub-AntiCheatAddition, src/main/java/de/photon/anticheataddition/modules/additions/BrandHider.java

Variations: Photon's inbound twin is BrandChannelData, a ParsedPluginMessageListener that records the client brand into the user object; MessageChannel.MC_BRAND_CHANNEL is the shared channel constant.
Sibyl brand authentication (intave) (intave-intave)

Mark the server for the Intave companion client: emit an S3F brand payload carrying the Intave identifier so the Sibyl client can authenticate.

On join, and again on every restart broadcast and whenever a player is not yet authenticated, the service calls authentication.sendMessageToClient(player, 'MC|Brand', 'INTAVE', null), which writes the payload into an outbound custom payload packet (SibylAuthentication.java builds the ProtocolLib container around line 251). The companion client recognizes the mark and replies over its own channel.

Detects: Nothing cheat-related. It is the anticheat's outbound identification channel; the brand mark also lets the anticheat tell its own clients from vanilla ones.

Source: intave-intave, src/main/java/de/jpx3/intave/connect/sibyl/SibylIntegrationService.java

Variations: The inbound side of the same system is PayloadInReader, a CUSTOM_PAYLOAD_IN reader that intave's SettingsTracker, CustomClientSupportService and LabymodClientListener consume for brand and LabyMod detection.
FML mod probe (Negativity) (Elikill58-Negativity)

Detect Forge clients by sending FML handshake payloads and reading the mod-list reply.

initMods sends three FML|HS plugin messages (bytes {-2,0}, {0,2,0,0,0,0} and {2,0,0,0,0}) to the player when the outgoing FML channel is registered, the standard FML handshake sequence that makes Forge reply with its mod list. ChannelEvents handles the incoming FML data (the C17 side) and stores the result in the player's mod map, which feeds the mod-based cheat checks.

Detects: The presence and version of Forge and its mods; server owners use the result to allow or block modded clients.

Source: Elikill58-Negativity, src/com/elikill58/negativity/spigot/SpigotNegativityPlayer.java

Variations: Negativity's PacketType declares CUSTOM_PAYLOAD_IN and CUSTOM_PAYLOAD_OUT for both directions. No other anticheat probes FML; the modern anticheats read the brand channel instead.

Wiki Cross-Reference

Channel string capped at 20 chars plus raw payload capped at 1048576 bytes (1MB); larger payloads throw IOException.

Vanilla channels: MC|Brand sent once at join, MC|TrList villager trades, MC|BOpen written book. Unknown channels are ignored.

MCP 1.8.9 S3FPacketCustomPayload implements Packet dispatching to INetHandlerPlayClient.handleCustomPayload; wire serde is readPacketData/writePacketData via readBytes, readStringFromBuffer, readableBytes.

1.8.9 callers: EntityPlayerMP.displayVillagerTradeGui sends new S3FPacketCustomPayload (line 819) +1 more: https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/player/EntityPlayerMP.java

Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.

Vanilla Internals

Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.