Skip to content

Commit 5ff3c18

Browse files
committed
chore: resolve packetevents deprecation
1 parent 5e9b9df commit 5ff3c18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bukkit/src/main/java/com/github/juliarn/npclib/bukkit/protocol/PacketEventsPacketAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ private static final class Lazy {
543543
if (component.rawMessage() != null) {
544544
return AdventureSerializer.fromLegacyFormat(component.rawMessage());
545545
} else {
546-
return AdventureSerializer.getGsonSerializer().deserializeOrNull(component.encodedJsonMessage());
546+
return AdventureSerializer.parseComponent(component.encodedJsonMessage());
547547
}
548548
}));
549549
} else {
@@ -562,7 +562,7 @@ private static final class Lazy {
562562
.put(Float.class, EntityDataTypes.FLOAT)
563563
.put(Boolean.class, EntityDataTypes.BOOLEAN)
564564
.put(String.class, EntityDataTypes.STRING)
565-
.put(OPTIONAL_CHAT_COMPONENT_TYPE, EntityDataTypes.OPTIONAL_COMPONENT)
565+
.put(OPTIONAL_CHAT_COMPONENT_TYPE, EntityDataTypes.OPTIONAL_ADV_COMPONENT)
566566
.put(com.github.retrooper.packetevents.protocol.entity.pose.EntityPose.class, EntityDataTypes.ENTITY_POSE)
567567
.build();
568568
}

0 commit comments

Comments
 (0)