Check classes before copying

This commit is contained in:
spring-dependency-management authored and GitHub committed 2025-03-06 15:35:31 +00:00
1 parent ef49276809
commit 2cd2f5d7f9
1 file changed
+1 -1
@@ -271,7 +271,7 @@ public class PacketWrapper<T extends PacketWrapper<T>> {
public final void readEvent(ProtocolPacketEvent event) {
PacketWrapper<?> last = event.getLastUsedWrapper();
if (last != null) {
if (last != null && this.getClass() == last.getClass()) {
copy((T) last);
} else {
read();