spawnPacketHandler

open fun spawnPacketHandler(@NotNull spawnPacketHandler: @NotNull Consumer<PacketBundler>)

Adds a handler invoked when spawn packets are bundled.

Additional handlers are executed sequentially via andThen.


pipeline.spawnPacketHandler(bundler -> {
    // append custom packets to spawn bundler
});

Since

1.15.2

Parameters

spawnPacketHandler

the consumer to handle spawn packets

Throws

if spawnPacketHandler is null