Because I want to send packets both from spigot to forge and forge to spigot.
I'll remove the thing.
I've found this thread which someone ask the same thing as me. But he/you didn't show the code. Can you post an example code of using ByteArrayDataOutput?
http://www.minecraftforge.net/forum/topic/59154-communication-between-forge-mod-and-bukkit-plugin/
But if I use sponge, every player MUST install this mod, I just want this mod to be extra. Such as betterpvp mod or 5zig.
Please correct me if I'm wrong
First,
I'm using this class to receive packets. https://hastebin.com/amijotirif.java
How do I check if the "EntityPlayerMP" to the player that is playing?
Second,
What should I do to receive packets in spigot?
Third,
What should I do to send packets in spigot?
1. I want to send a packet in forge client when a player joins the server
2. I want spigot to send a packet when issue a spigot command. Then the forge mod reacts back with another packet.
Spigot link with same things: https://www.spigotmc.org/threads/how-to-send-and-receive-packets-between-spigot-and-forge.321331/