saicone / OneTimePack

Bungeecord and Velocity plugin that reduces duplicated resource pack requests
MIT License
17 stars 2 forks source link

PacketEvents Usage Issue #6

Closed retrooper closed 2 months ago

retrooper commented 2 months ago

https://github.com/saicone/OneTimePack/blob/36370092970d467afb252214a339a28583b439dc/module/module-packetevents/src/main/java/com/saicone/onetimepack/core/PacketEventsProcessor.java#L54

This line should probably be replaced with

packet.setServerVersion(event.getUser().getClientVersion().toServerVersion());
retrooper commented 2 months ago

Likewise https://github.com/saicone/OneTimePack/blob/36370092970d467afb252214a339a28583b439dc/module/module-packetevents/src/main/java/com/saicone/onetimepack/core/PacketEventsProcessor.java#L86 should be adjusted.

retrooper commented 2 months ago

Does this work with VPacketEvents + PacketEvents on your server, if yes, then it's an issue in your usage, since VPacketEvents uses PacketEvents when available.