Updated changes for latest Geyser version

This commit is contained in:
Tim203 2022-06-07 00:31:29 +02:00
parent d8b63b9310
commit 378aa6ed99
No known key found for this signature in database
GPG key ID: 064EE9F5BF7C3EE8
2 changed files with 5 additions and 2 deletions

View file

@ -31,8 +31,11 @@ public final class PluginMessageChannels {
public static final String SKIN = "floodgate:skin";
public static final String FORM = "floodgate:form";
public static final String TRANSFER = "floodgate:transfer";
public static final String PACKET = "floodgate:packet";
private static final byte[] FLOODGATE_REGISTER_DATA = String.join("\0", SKIN, FORM, TRANSFER).getBytes(Charsets.UTF_8);
private static final byte[] FLOODGATE_REGISTER_DATA =
String.join("\0", SKIN, FORM, TRANSFER, PACKET)
.getBytes(Charsets.UTF_8);
/**
* Get the prebuilt register data as a byte array

View file

@ -103,7 +103,7 @@ public class JavaCustomPayloadTranslator extends PacketTranslator<ClientboundCus
transferPacket.setPort(port);
session.sendUpstreamPacket(transferPacket);
} else if (channel.equals("floodgate:packet")) {
} else if (channel.equals(PluginMessageChannels.PACKET)) {
logger.debug("A packet has been sent using the Floodgate api");
byte[] data = packet.getData();