Skip to content

Commit

Permalink
Merge pull request BetonQuest#2568 from Wolf2323/ProtcolLib1.20
Browse files Browse the repository at this point in the history
fixed ProtocolLib warning for Minecraft 1.20.2
  • Loading branch information
J0B10 authored Oct 31, 2023
2 parents 7f1be17 + c9ff1bc commit 3d800f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class EntityHider implements Listener {
final List<PacketType> 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,
Expand All @@ -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);
}
Expand Down

0 comments on commit 3d800f7

Please sign in to comment.