diff --git a/src/main/java/net/minestom/server/network/packet/server/play/MapDataPacket.java b/src/main/java/net/minestom/server/network/packet/server/play/MapDataPacket.java index d14ec40df..5d1386e07 100644 --- a/src/main/java/net/minestom/server/network/packet/server/play/MapDataPacket.java +++ b/src/main/java/net/minestom/server/network/packet/server/play/MapDataPacket.java @@ -38,13 +38,15 @@ public class MapDataPacket implements ComponentHoldingServerPacket { writer.writeBoolean(locked); writer.writeBoolean(trackingPosition); - if (icons != null && icons.length > 0) { - writer.writeVarInt(icons.length); - for (Icon icon : icons) { - icon.write(writer); + if (trackingPosition) { + if (icons != null && icons.length > 0) { + writer.writeVarInt(icons.length); + for (Icon icon : icons) { + icon.write(writer); + } + } else { + writer.writeVarInt(0); } - } else { - writer.writeVarInt(0); } writer.writeByte((byte) columns);