Mirror von
https://github.com/Moulberry/AxiomPaperPlugin.git
synchronisiert 2024-11-14 12:10:05 +01:00
16 Zeilen
554 B
Java
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))));
|
|
}
|
|
|
|
}
|