Mirror von
https://github.com/Moulberry/AxiomPaperPlugin.git
synchronisiert 2024-11-17 05:40:06 +01:00
Adapt version util for 1.20.1
Dieser Commit ist enthalten in:
Ursprung
88d9602428
Commit
c4b51b0e7e
@ -1,14 +1,15 @@
|
|||||||
package com.moulberry.axiom;
|
package com.moulberry.axiom;
|
||||||
|
|
||||||
import com.moulberry.axiom.packet.CustomByteArrayPayload;
|
import io.netty.buffer.Unpooled;
|
||||||
import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket;
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundCustomPayloadPacket;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
|
|
||||||
public class VersionHelper {
|
public class VersionHelper {
|
||||||
|
|
||||||
public static void sendCustomPayload(ServerPlayer serverPlayer, ResourceLocation id, byte[] data) {
|
public static void sendCustomPayload(ServerPlayer serverPlayer, ResourceLocation id, byte[] data) {
|
||||||
serverPlayer.connection.send(new ClientboundCustomPayloadPacket(new CustomByteArrayPayload(id, data)));
|
serverPlayer.connection.send(new ClientboundCustomPayloadPacket(id, new FriendlyByteBuf(Unpooled.wrappedBuffer(data))));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren