Changelog
• Creating wrappers is much easier, cleaner and shorter.
• Thread safety issues with the new event priority system fixed(didn't let users connect to the server)
• You can make your own mini wrappers, example:
Code (Text):
@PacketHandler
public void onReceive(PacketReceiveEvent event) {
if(event.getPacketId() == PacketType.Client.FLYING) {
WrappedPacket miniWrapper = new WrappedPacket(event.getNMSPacket());
double x = miniWrapper.readDouble(0);
double y = miniWrapper.readDouble(1);
double z = miniWrapper.readDouble(2);
boolean onGround = miniWrapper.readBoolean(0);
}
}
All current packet wrappers use these new functions ('readDouble', ect...).
So if a wrapper doesn't already exist, you can use these functions.
• Code cleanup in ALL wrappers
• WrappedPacketOutAbilities#getWalkSpeed() accidentally returned the value of WrappedPacketOutAbilities#getFlySpeed()
• WrappedPacketOutChat.fromStringToJSON() debug removed
• WrappedPacketOutKickDisconnect constructor now requires a json string, and doesn't convert for you
• WrappedPacketOutUpdateHealth#getFoodSaturation() accidentally returned the value of WrappedPacketOutUpdateHealth#getHealth()
• WrappedPacketOutEntity has subclasses, like rel entity move, ect...
• WrappedPacketInFlying subclasses no longer extend the WrappedPacketInFlying, they are now just static classes inside it, this will mean they won't contain all functions like WrappedPacketInFlying does, this was done just to avoid confusion.