3
0
Mirror von https://github.com/Moulberry/AxiomPaperPlugin.git synchronisiert 2024-11-14 20:20:07 +01:00
AxiomPaperPlugin/src/main/java/com/moulberry/axiom/VersionHelper.java

16 Zeilen
554 B
Java

package com.moulberry.axiom;
2024-03-06 09:21:27 +01:00
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) {
2024-03-06 09:21:27 +01:00
serverPlayer.connection.send(new ClientboundCustomPayloadPacket(id, new FriendlyByteBuf(Unpooled.wrappedBuffer(data))));
}
}