--- a/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
+++ b/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
@@ -75,7 +75,16 @@
             Vec3 vec3 = context.getParamOrNull(LootContextParams.ORIGIN);
             if (vec3 != null) {
                 ServerLevel serverLevel = context.getLevel();
-                BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, BlockPos.containing(vec3), this.searchRadius, this.skipKnownStructures);
+                // Paper start
+                if (!serverLevel.paperConfig().environment.treasureMaps.enabled) {
+                    /*
+                     * NOTE: I fear users will just get a plain map as their "treasure"
+                     * This is preferable to disrespecting the config.
+                     */
+                    return stack;
+                }
+                // Paper end
+                BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, BlockPos.containing(vec3), this.searchRadius, !serverLevel.paperConfig().environment.treasureMaps.findAlreadyDiscoveredLootTable.or(!this.skipKnownStructures)); // Paper
                 if (blockPos != null) {
                     ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), this.zoom, true, true);
                     MapItem.renderBiomePreviewMap(serverLevel, itemStack);
