Fixed NPE on CustomPayload packets with 0 data
This commit is contained in:
parent
43ac9d6799
commit
be1dd4934a
|
@ -406,6 +406,11 @@ public class MessageManager
|
||||||
|
|
||||||
public void dispatchIncomingMessage(NetworkManager manager, String channel, byte[] data)
|
public void dispatchIncomingMessage(NetworkManager manager, String channel, byte[] data)
|
||||||
{
|
{
|
||||||
|
if (data == null)
|
||||||
|
{
|
||||||
|
data = new byte[0];
|
||||||
|
}
|
||||||
|
|
||||||
if (channel.equals("Forge"))
|
if (channel.equals("Forge"))
|
||||||
{
|
{
|
||||||
if (ForgeHooks.getPacketHandler() != null)
|
if (ForgeHooks.getPacketHandler() != null)
|
||||||
|
|
Loading…
Reference in New Issue