3
0
Mirror von https://github.com/Moulberry/AxiomPaperPlugin.git synchronisiert 2024-11-14 12:10:05 +01:00
AxiomPaperPlugin/src/main/java/com/moulberry/axiom/VersionHelper.java
2024-03-06 16:21:27 +08:00

16 Zeilen
554 B
Java

package com.moulberry.axiom;
import io.netty.buffer.Unpooled;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.protocol.game.ClientboundCustomPayloadPacket;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
public class VersionHelper {
public static void sendCustomPayload(ServerPlayer serverPlayer, ResourceLocation id, byte[] data) {
serverPlayer.connection.send(new ClientboundCustomPayloadPacket(id, new FriendlyByteBuf(Unpooled.wrappedBuffer(data))));
}
}