All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minestom.server.crypto.SignedMessageHeader Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
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
    );
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy