mirror of https://github.com/LOOHP/Limbo.git
Fixed PacketPlayInPluginMessaging, as Channel was always returning null, this was because there was a String being declared in the instructer, but wasn't being passed to the entire class
This commit is contained in:
parent
8fa1b504f2
commit
34cba4659b
|
|
@ -19,12 +19,12 @@
|
||||||
|
|
||||||
package com.loohp.limbo.network.protocol.packets;
|
package com.loohp.limbo.network.protocol.packets;
|
||||||
|
|
||||||
import com.loohp.limbo.utils.DataTypeIO;
|
|
||||||
|
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
|
import com.loohp.limbo.utils.DataTypeIO;
|
||||||
|
|
||||||
public class PacketPlayInPluginMessaging extends PacketIn {
|
public class PacketPlayInPluginMessaging extends PacketIn {
|
||||||
|
|
||||||
private String channel;
|
private String channel;
|
||||||
|
|
@ -36,7 +36,7 @@ public class PacketPlayInPluginMessaging extends PacketIn {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PacketPlayInPluginMessaging(DataInputStream in, int packetLength, int packetId) throws IOException {
|
public PacketPlayInPluginMessaging(DataInputStream in, int packetLength, int packetId) throws IOException {
|
||||||
String channel = DataTypeIO.readString(in, StandardCharsets.UTF_8);
|
channel = DataTypeIO.readString(in, StandardCharsets.UTF_8);
|
||||||
int dataLength = packetLength - DataTypeIO.getVarIntLength(packetId) - DataTypeIO.getStringLength(channel, StandardCharsets.UTF_8);
|
int dataLength = packetLength - DataTypeIO.getVarIntLength(packetId) - DataTypeIO.getStringLength(channel, StandardCharsets.UTF_8);
|
||||||
data = new byte[dataLength];
|
data = new byte[dataLength];
|
||||||
in.readFully(data);
|
in.readFully(data);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue