diff --git a/CHANGELOG.md b/CHANGELOG.md index b7ddf9c926..457fb4033e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -275,6 +275,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - conversation IO chest did not show the correct NPC heads - conversation could have a deadlock and a player can get stuck in a conversation - conversation could not be canceled due to a race condition + - ProtocolLib warning for Minecraft 1.20.2 - `npcrange` objective - is triggered at wrong time - `command` event - includes 'conditions:...' into the command - `craft` objective - multi-craft, drop-craft, hotbar/offhand-craft, shift-Q-craft and any illegal crafting is diff --git a/src/main/java/org/betonquest/betonquest/compatibility/protocollib/hider/EntityHider.java b/src/main/java/org/betonquest/betonquest/compatibility/protocollib/hider/EntityHider.java index 3a092712f7..b0af32fba3 100644 --- a/src/main/java/org/betonquest/betonquest/compatibility/protocollib/hider/EntityHider.java +++ b/src/main/java/org/betonquest/betonquest/compatibility/protocollib/hider/EntityHider.java @@ -45,7 +45,6 @@ public class EntityHider implements Listener { final List entityPackets = new ArrayList<>(List.of( PacketType.Play.Server.ENTITY_EQUIPMENT, PacketType.Play.Server.ANIMATION, - PacketType.Play.Server.NAMED_ENTITY_SPAWN, PacketType.Play.Server.COLLECT, PacketType.Play.Server.SPAWN_ENTITY, PacketType.Play.Server.SPAWN_ENTITY_EXPERIENCE_ORB, @@ -69,6 +68,11 @@ public class EntityHider implements Listener { entityPackets.add(PacketType.Play.Server.SPAWN_ENTITY_LIVING); entityPackets.add(PacketType.Play.Server.SPAWN_ENTITY_PAINTING); } + // TODO version switch: + // Remove this code when only 1.20.2+ is supported + if (!PaperLib.isVersion(20, 2)) { + entityPackets.add(PacketType.Play.Server.NAMED_ENTITY_SPAWN); + } ENTITY_PACKETS = entityPackets.toArray(PacketType[]::new); }