net.minestom.server.crypto.SignedMessageHeader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of minestom-snapshots Show documentation
Show all versions of minestom-snapshots Show documentation
1.20.4 Lightweight Minecraft server
package net.minestom.server.crypto;
import net.minestom.server.network.NetworkBuffer;
import net.minestom.server.network.NetworkBufferTemplate;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.UUID;
public record SignedMessageHeader(@Nullable MessageSignature previousSignature, @NotNull UUID sender) {
public static final NetworkBuffer.Type SERIALIZER = NetworkBufferTemplate.template(
MessageSignature.SERIALIZER.optional(), SignedMessageHeader::previousSignature,
NetworkBuffer.UUID, SignedMessageHeader::sender,
SignedMessageHeader::new
);
}